[Lldb-commits] [PATCH] D133410: [lldb] Fix ThreadedCommunication races

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 7 03:50:45 PDT 2022


mgorny added inline comments.


================
Comment at: lldb/source/Core/ThreadedCommunication.cpp:113
 
-      if (event_type & eBroadcastBitReadThreadDidExit) {
-        // If the thread exited of its own accord, it either means it
-        // hit an end-of-file condition or an error.
-        status = m_pass_status;
-        if (error_ptr)
-          *error_ptr = std::move(m_pass_error);
+    // Re-check for data, as it might have arrived while we were setting up our
+    // listener.
----------------
Can you think of any reason not to move listener setup before the first `GetCachedBytes()` call instead of duplicating it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133410



More information about the lldb-commits mailing list