Currently:
(lldb) l main ================================================================= ==26703==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ffc8 at pc 0x7f6aaaaffea0 bp 0x7ffda6302f30 sp 0x7ffda6302f20 READ of size 8 at 0x60200000ffc8 thread T0 #0 in DWARFDebugInfoEntry::BuildAddressRangeTable(SymbolFileDWARF*, DWARFCompileUnit const*, DWARFDebugAranges*) const tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1336 #1 in DWARFDebugInfoEntry::BuildAddressRangeTable(SymbolFileDWARF*, DWARFCompileUnit const*, DWARFDebugAranges*) const tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:1350 #2 in DWARFCompileUnit::BuildAddressRangeTable(SymbolFileDWARF*, DWARFDebugAranges*) tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:438 0x60200000ffc8 is located 8 bytes to the right of 16-byte region [0x60200000ffb0,0x60200000ffc0) allocated by thread T2 here: #0 in operator new(unsigned long) (/lib64/libasan.so.3+0xc7ea0) #1 in __gnu_cxx::new_allocator<DWARFDebugInfoEntry>::allocate(unsigned long, void const*) /usr/include/c++/6.3.1/ext/new_allocator.h:104 #2 in std::allocator_traits<std::allocator<DWARFDebugInfoEntry> >::allocate(std::allocator<DWARFDebugInfoEntry>&, unsigned long) /usr/include/c++/6.3.1/bits/alloc_traits.h:416 #3 in std::__cxx1998::_Vector_base<DWARFDebugInfoEntry, std::allocator<DWARFDebugInfoEntry> >::_M_allocate(unsigned long) /usr/include/c++/6.3.1/bits/stl_vector.h:170 #4 in void std::__cxx1998::vector<DWARFDebugInfoEntry, std::allocator<DWARFDebugInfoEntry> >::_M_emplace_back_aux<DWARFDebugInfoEntry const&>(DWARFDebugInfoEntry const&) /usr/include/c++/6.3.1/bits/vector.tcc:412 #5 in std::__cxx1998::vector<DWARFDebugInfoEntry, std::allocator<DWARFDebugInfoEntry> >::push_back(DWARFDebugInfoEntry const&) /usr/include/c++/6.3.1/bits/stl_vector.h:924 #6 in std::__debug::vector<DWARFDebugInfoEntry, std::allocator<DWARFDebugInfoEntry> >::push_back(DWARFDebugInfoEntry const&) /usr/include/c++/6.3.1/debug/vector:465 #7 in DWARFCompileUnit::AddDIE(DWARFDebugInfoEntry&) (/quad/home/jkratoch/redhat/llvm-git-build/bin/../lib/liblldb.so.5+0x3ff19fc) #8 in DWARFCompileUnit::AddCompileUnitDIE(DWARFDebugInfoEntry&) tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:283 #9 in DWARFCompileUnit::ExtractDIEsIfNeeded(bool) tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:186
Fixed:
(lldb) target create "true.all" Current executable set to 'true.all' (x86_64). (lldb) l main warning: (x86_64) true.all 0x000004ff: compile unit 19 failed to create a valid lldb_private::CompileUnit class. error: Could not find function named: "main".
This patch does not really implement DWZ support but in general LLDB should not crash on DWARF tags it does not know.
The warning there locks up, I do not know why yet, it is some unrelated bug. There was already an existing other ReportWarning() which would apparently also lock up now. I haven't try to test old versions and possibly bisect it yet.
Attached true.all is from Fedora 25 x86_64:
eu-unstrip -o true.all /usr/bin/true /usr/lib/debug/bin/true.debug