summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2018-11-16 06:04:28 +0000
committerTom Stellard <tstellar@redhat.com>2018-11-16 06:04:28 +0000
commit85e1cc5cd7a65280bf6d0bbdb0036c20f55c1b5f (patch)
treef7b159d01aac4f5f02cb0373ff886370b167eebe
parent35aa48a4a4e423968c08ba98c545142c011ffa2d (diff)
downloadbcm5719-llvm-85e1cc5cd7a65280bf6d0bbdb0036c20f55c1b5f.tar.gz
bcm5719-llvm-85e1cc5cd7a65280bf6d0bbdb0036c20f55c1b5f.zip
Merging r344605:
------------------------------------------------------------------------ r344605 | jankratochvil | 2018-10-16 04:38:22 -0700 (Tue, 16 Oct 2018) | 12 lines Fix: Assertion failed: (!m_first_die || m_first_die == m_die_array.front()), function ExtractDIEsRWLocked xbolva00 bugreported $subj in: https://reviews.llvm.org/D46810#1247410 It can happen only from the line: m_die_array.back().SetEmptyChildren(true); In the case DW_TAG_compile_unit has DW_CHILDREN_yes but there is only 0 (end of list, no children present). Therefore the assertion can fortunately happen only with a hand-crafted DWARF or with DWARF from some suboptimal compilers. Differential Revision: https://reviews.llvm.org/D53255 ------------------------------------------------------------------------ llvm-svn: 347030
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index f44b2bb97b2..d26556d73e2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -261,7 +261,11 @@ void DWARFUnit::ExtractDIEsRWLocked() {
}
if (!m_die_array.empty()) {
- lldbassert(!m_first_die || m_first_die == m_die_array.front());
+ if (m_first_die) {
+ // Only needed for the assertion.
+ m_first_die.SetEmptyChildren(m_die_array.front().GetEmptyChildren());
+ lldbassert(m_first_die == m_die_array.front());
+ }
m_first_die = m_die_array.front();
}
OpenPOWER on IntegriCloud