[Lldb-commits] [PATCH] D120762: [lldb] Avoid data race in IOHandlerProcessSTDIO

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 2 00:40:36 PST 2022


JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.


================
Comment at: lldb/source/Target/Process.cpp:4343
+        std::lock_guard<std::mutex> guard(m_mutex);
+        if (GetIsDone())
+          break;
----------------
labath wrote:
> I'm confused. How come this does not immediately terminate due to GetIsDone (through SetIsDone(true) via SetIsRunning(true) on line 4339) returning true?
Yeah this is bogus, that line should read `SetIsDone(!running);`. I originally had these 3 lines inline and made a typo when extracting the function and didn't rerun the tests.


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

https://reviews.llvm.org/D120762



More information about the lldb-commits mailing list