Community
Participate
Working Groups
Created attachment 288522 [details] the sample code the sUnit->mStrOffsetsSection pointer is NULL in dio_ReadFormStringIndex () function as following call trace: Thread #1 [tcf-server] 729931 [core: 65] (Suspended : Signal : SIGSEGV:Segmentation fault) elf_load() at tcf_elf.c:1,067 0x48566e dio_EnterSection() at dwarfio.c:123 0x4ae53f dio_ReadFormStringIndex() at dwarfio.c:535 0x4af923 dio_ReadAttribute() at dwarfio.c:612 0x4b0100 dio_ReadEntry() at dwarfio.c:740 0x4b09b9 dio_ReadUnit() at dwarfio.c:913 0x4b145a load_debug_info_section() at dwarfcache.c:1,593 0x4a25e9 load_debug_sections() at dwarfcache.c:1,695 0x4a2c54 get_dwarf_cache() at dwarfcache.c:2,249 0x4a4af5 find_symbol_by_name() at symbols_elf.c:1,760 0x4778ee <...more frames...>
Created attachment 288523 [details] the binary file compiled from llvm 14
in function read_object_info(), the TCF used the following code to init Unit->mDesc.mStrOffsetsSection pointer as follwoing at line 934: case AT_str_offsets_base: read_section_ptr(Form, &Unit->mDesc.mStrOffsetsSection, &Unit->mDesc.mStrOffsetsOffs, sCache->mDebugStrOffsets); break;
when we debug the TCF code, we found the Unit->mDesc.mStrOffsetsSection pointer never be inited. if we use GDB with the same binary exec file, there are not this issue. the binary is for x86_64. since this issue caused many issue on our side, so we set the priority to P3 (critical) , sorry.
if we added the code to init the sUnit->mStrOffsetsSection pointer in read_object_info(), this issue gone.
LLVM 14 uses some new features of DWARF 5, which are not supported yet by TCF. I have add support for LLVM 14. Fixed. Thanks!