[Lldb-commits] [PATCH] D157159: [lldb] Properly protect the Communication class with reader/writer lock

Augusto Noronha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 4 17:02:17 PDT 2023


augusto2112 accepted this revision.
augusto2112 added a comment.
This revision is now accepted and ready to land.

On the description you mention `unique_ptr` but I only see `shared_ptr` here. Was that a typo or do you mean that users of this class kept it behind a `unique_ptr`?

In any case I think this change is great.



================
Comment at: lldb/source/Core/Communication.cpp:43
 
+  std::unique_lock guard(m_shared_mutex);
   LLDB_LOG(GetLog(LLDBLog::Communication),
----------------
Do you think it's possible that between the call to `Clear` and this lock someone acquires the lock?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157159/new/

https://reviews.llvm.org/D157159



More information about the lldb-commits mailing list