Changeset 4978 in CLRX


Ignore:
Timestamp:
Sep 19, 2019, 3:45:19 PM (4 weeks ago)
Author:
matszpk
Message:

CLRadeonExtender: ROCm: Fixed compiler warning. fixed segfault when kernel descriptor offset is out of range.

Location:
CLRadeonExtender/trunk
Files:
2 edited

Legend:

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

    r4970 r4978  
    10541054            for (size_t p = 0; p < rocmInput->globalDataSize; )
    10551055            {
    1056                 const size_t end = kdit != kdescOffsets.end() ?
     1056                const size_t end = (kdit != kdescOffsets.end() &&
     1057                        *kdit < rocmInput->globalDataSize) ?
    10571058                        *kdit : rocmInput->globalDataSize;
    10581059                if (kdit == kdescOffsets.end() || p < *kdit)
  • CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp

    r4977 r4978  
    135135        mapSort(tmpKernelDescs.begin(), tmpKernelDescs.end());
    136136        kernelDescs.resize(regionsNum);
     137        std::fill(kernelDescs.begin(), kernelDescs.end(), nullptr);
    137138    }
    138139   
     
    608609    addMainSectionToTable(mainSectionsNum, mainBuiltinSectTable, ELFSECTID_STRTAB);
    609610   
    610     const cxuint abiVer = (input->newBinFormat && input->llvm10BinFormat) ? 1 : 0;
     611    const cxbyte abiVer = (input->newBinFormat && input->llvm10BinFormat) ? 1 : 0;
    611612   
    612613    elfBinGen64.reset(new ElfBinaryGen64({ 0U, 0U, 0x40, abiVer, ET_DYN, 0xe0, EV_CURRENT,
Note: See TracChangeset for help on using the changeset viewer.