[Lldb-commits] [lldb] Fix lldb crash while handling concurrent vfork() (PR #81564)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 5 16:04:28 PST 2024


================
@@ -0,0 +1,115 @@
+"""
+Make sure that the concurrent vfork() from multiple threads works correctly.
+"""
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+
+class TestConcurrentVFork(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def get_pid_from_variable(self):
+        target = self.dbg.GetTargetAtIndex(0)
----------------
clayborg wrote:

Don't use this, the target should be returned from the call to `lldbutil.run_to_source_breakpoint`. I put example code in an inline comment below. So pass the target into here. I don't think we can rely on the debugger having only one target.

https://github.com/llvm/llvm-project/pull/81564


More information about the lldb-commits mailing list