Changeset 3592 in CLRX


Ignore:
Timestamp:
Jan 8, 2018, 2:02:51 PM (5 months ago)
Author:
matszpk
Message:

CLRadeonExtender: AsmRegAlloc?: Fixed segfaults and valgrind's invalids if empty code.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/amdasm/AsmRegAlloc.cpp

    r3591 r3592  
    265265{
    266266    ISAAssembler* isaAsm = assembler.isaAssembler;
     267    if (codeSize == 0)
     268        return;
    267269    std::vector<size_t> splits;
    268270    std::vector<size_t> codeStarts;
     
    665667void AsmRegAllocator::createSSAData(ISAUsageHandler& usageHandler)
    666668{
     669    if (codeBlocks.empty())
     670        return;
    667671    usageHandler.rewind();
    668672    auto cbit = codeBlocks.begin();
  • CLRadeonExtender/trunk/tests/amdasm/AsmRegAlloc.cpp

    r3590 r3592  
    555555        true, ""
    556556    },
     557    {   /* 14 - empty */
     558        ".regvar sa:s:8, va:v:12, vb:v:10\n",
     559        { },
     560        true, ""
     561    }
    557562};
    558563
     
    10201025        { },
    10211026        true, ""
     1027    },
     1028    {   /* 4 - empty! */
     1029        R"ffDXD(.regvar sa:s:8, va:v:12, vb:v:10
     1030)ffDXD",
     1031        {
     1032        },
     1033        { },
     1034        true, ""
    10221035    }
    10231036};
Note: See TracChangeset for help on using the changeset viewer.