[lldb/DWARF] Fix a crash parsing invalid dwarf (pr49678)
authorPavel Labath <pavel@labath.sk>
Sat, 27 Mar 2021 20:21:14 +0000 (21:21 +0100)
committerPavel Labath <pavel@labath.sk>
Thu, 8 Apr 2021 14:48:02 +0000 (16:48 +0200)
commit2ecf928153fc56dcb6bb0bd910584eac86bc23bd
treea99ed51365dedbf4728ade6d3fde8450c35aa974
parent1e511bb1be718657a5584ccb792723d9ddac481f
[lldb/DWARF] Fix a crash parsing invalid dwarf (pr49678)

If the debug info is missing the terminating null die, we would crash
when trying to access the nonexisting children/siblings. This was
discovered because the test case for D98619 accidentaly produced such
input.
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/unittests/SymbolFile/DWARF/DWARFUnitTest.cpp