[Lldb-commits] [PATCH] D157159: [lldb] Properly protect the Communication class with reader/writer lock
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 4 17:34:41 PDT 2023
bulbazord added inline comments.
================
Comment at: lldb/source/Core/Communication.cpp:43
+ std::unique_lock guard(m_shared_mutex);
LLDB_LOG(GetLog(LLDBLog::Communication),
----------------
JDevlieghere wrote:
> augusto2112 wrote:
> > Do you think it's possible that between the call to `Clear` and this lock someone acquires the lock?
> Yes, you're both correct. We can't use the `ClearUnlocked` trick here because it's `Disconnect` that locks and `Clear` is virtual. I'll need to play around with this. Maybe we don't need a `Clear` and we can call `DisconnectUnlocked` directly ?
Yeah calling `Disconnect` in an unlocked fashion would solve that if you called it after locking in `Connect`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157159/new/
https://reviews.llvm.org/D157159
More information about the lldb-commits
mailing list