[Lldb-commits] [PATCH] D46810: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun May 13 12:14:57 PDT 2018


jankratochvil created this revision.
jankratochvil added reviewers: clayborg, labath.
Herald added subscribers: JDevlieghere, aprantl.

  +  // GetUnitDIEPtrOnly() needs to return pointer to the first DIE.
  +  // But the first element of m_die_array after ExtractDIEsIfNeeded(true)
  +  // may move in memory after later ExtractDIEsIfNeeded(false).

I haven't tried to reproduce it. `DWARFDebugInfoEntry::collection m_die_array` is `std::vector`, its data may move during its expansion.
I would not mind but I have found I cannot make the code thread-safe for https://reviews.llvm.org/D40470 when it looks already incorrect to me.


https://reviews.llvm.org/D46810

Files:
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
  source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  source/Plugins/SymbolFile/DWARF/DWARFUnit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46810.146522.patch
Type: text/x-patch
Size: 8421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180513/f0b2fa49/attachment.bin>


More information about the lldb-commits mailing list