[Lldb-commits] [PATCH] D98822: [lldb] [Process] Watch for fork/vfork notifications

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 13 05:35:18 PDT 2021


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


================
Comment at: lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:904-905
+      NativeThreadLinux &child_thread = AddThread(child_pid, /*resume*/ true);
+      // Resume the newly created thread.
+      ResumeThread(child_thread, eStateRunning, LLDB_INVALID_SIGNAL_NUMBER);
+      ThreadWasCreated(child_thread);
----------------
labath wrote:
> This is resuming the thread a second time. If the thread manages to stop between the resume inside AddThread, and here, we will miss the breakpoint (and subsequently crash).
> 
> Deleting these two lines should fix things.
Hmm, I wonder why it ended up being added here. Probably my mistake, sorry, and thanks for debugging it. I'm going to test and reland it shortly!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98822



More information about the lldb-commits mailing list