================
@@ -5670,8 +5673,9 @@ void ProcessGDBRemote::DidVFork(lldb::pid_t child_pid, 
lldb::tid_t child_tid) {
 }
 
 void ProcessGDBRemote::DidVForkDone() {
-  assert(m_vfork_in_progress);
-  m_vfork_in_progress = false;
+  assert(m_vfork_in_progress_count > 0);
+  if (m_vfork_in_progress_count > 0)
+    --m_vfork_in_progress_count;
----------------
clayborg wrote:

We decrement `m_vfork_in_progress_count` in two places, here and in 
`ProcessGDBRemote::DidExec()`. Before this wouldn't affect anything because it 
was a boolean, but  I fear we will decrement this twice now. We probably need 
to add an `exec()` into our test case for this to ensure this assertion doesn't 
fire as I believe the assertion inside of `ProcessGDBRemote::DidExec()` will 
assert and crash.

https://github.com/llvm/llvm-project/pull/81564
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to