[Lldb-commits] [PATCH] D157153: [lldb] Fix ThreadList::Update not locking the rhs's mutex
Augusto Noronha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 4 16:12:11 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd75dc9a8a86c: [lldb] Fix ThreadList::Update not locking the rhs's mutex (authored by augusto2112).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157153/new/
https://reviews.llvm.org/D157153
Files:
lldb/source/Target/ThreadList.cpp
Index: lldb/source/Target/ThreadList.cpp
===================================================================
--- lldb/source/Target/ThreadList.cpp
+++ lldb/source/Target/ThreadList.cpp
@@ -736,7 +736,7 @@
if (this != &rhs) {
// Lock both mutexes to make sure neither side changes anyone on us while
// the assignment occurs
- std::lock_guard<std::recursive_mutex> guard(GetMutex());
+ std::scoped_lock guard(GetMutex(), rhs.GetMutex());
m_process = rhs.m_process;
m_stop_id = rhs.m_stop_id;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157153.547390.patch
Type: text/x-patch
Size: 522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230804/1718eb07/attachment.bin>
More information about the lldb-commits
mailing list