From 1e7ecd3e64461bc001495239eb168b0748d29c3d Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 24 Feb 2017 03:35:46 +0000 Subject: Fix a race condition in FuncUnwinders where the mutex was being acquired only after checking if the ivar shared pointer was already filled in. But when I assign an UnwindPlan object to the shared pointer, I assign an empty object and then fill it in. That leaves a window where another thread could get the shared pointer to the empty (but quickly being-filled-in) object and lead to a crash. Also two changes from Greg for correctness on the TestMultipleDebuggers test case. llvm-svn: 296084 --- .../lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp') diff --git a/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp b/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp index 883e3b56153..15170a3e5eb 100644 --- a/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp +++ b/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/multi-process-driver.cpp @@ -217,6 +217,10 @@ void *do_one_debugger (void *in) int main (int argc, char **argv) { +#if !defined(_MSC_VER) + signal(SIGPIPE, SIG_IGN); +#endif + SBDebugger::Initialize(); completed_threads_array = (bool *) malloc (sizeof (bool) * NUMBER_OF_SIMULTANEOUS_DEBUG_SESSIONS); -- cgit v1.2.3