[Lldb-commits] [PATCH] D83359: [SymbolFileDWARF] Lock the module when parsing call site info
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 7 16:59:59 PDT 2020
vsk created this revision.
vsk added reviewers: jasonmolenda, friss, jingham.
Herald added a subscriber: aprantl.
Herald added a project: LLDB.
DWARF-parsing methods in SymbolFileDWARF which update module state
should take the module lock. Have ParseCallEdgesInFunction do this.
This could explain some as-of-yet unreproducible crashes which occur in
Function::GetTailCallingEdges(), in which the `m_call_edges` vector is
both non-empty and contains a nullptr, which shouldn't be possible. (If
this vector is non-empty, it _must_ contain a non-null unique_ptr.)
This may address rdar://55622443, rdar://65119458.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83359
Files:
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3844,6 +3844,7 @@
std::vector<std::unique_ptr<lldb_private::CallEdge>>
SymbolFileDWARF::ParseCallEdgesInFunction(UserID func_id) {
+ std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
DWARFDIE func_die = GetDIE(func_id.GetID());
if (func_die.IsValid())
return CollectCallEdges(GetObjectFile()->GetModule(), func_die);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83359.276267.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200707/7f606f59/attachment.bin>
More information about the lldb-commits
mailing list