[Lldb-commits] [lldb] [lldb] Fix race condition in Process::WaitForProcessToStop() (PR #144919)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 3 12:32:56 PDT 2025
https://github.com/jimingham approved this pull request.
I don't think we ever have a use case where the Hijack listener would only want to see "new" events after the Hijack point. And that's certainly not what we want for process events where the full sequence is important. So the behavior you're encoding here is correct for the ways we use Listeners.
I had to think a second about whether we wanted the notification behavior of AddEvent (it both adds the event to the queue and wakes up any Listeners). But you have to do that. For instance, the original listener is very likely sitting in WaitForEvent - it has no way of knowing it's been hijacked - and so the events you transferred back have to wake it up from the Wait or we'll stall.
https://github.com/llvm/llvm-project/pull/144919
More information about the lldb-commits
mailing list