[Lldb-commits] [lldb] r109131 - /lldb/trunk/source/Target/Process.cpp

Greg Clayton gclayton at apple.com
Thu Jul 22 11:34:22 PDT 2010


Author: gclayton
Date: Thu Jul 22 13:34:21 2010
New Revision: 109131

URL: http://llvm.org/viewvc/llvm-project?rev=109131&view=rev
Log:
This patch changes the point at which Process::m_private_state_thread is
invalidated.  There was a race condition where the private thread would
invalidate its own pthread_t object before the parent could perform a
pthread_cancel/pthread_join sequence.

Patch from Stephen Wilson.


Modified:
    lldb/trunk/source/Target/Process.cpp

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=109131&r1=109130&r2=109131&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Jul 22 13:34:21 2010
@@ -1433,6 +1433,7 @@
 
             thread_result_t result = NULL;
             Host::ThreadJoin (m_private_state_thread, &result, NULL);
+            m_private_state_thread = LLDB_INVALID_HOST_THREAD;
         }
     }
 }
@@ -1470,7 +1471,6 @@
 {
     Process *proc = static_cast<Process*> (arg);
     void *result = proc->RunPrivateStateThread ();
-    proc->m_private_state_thread = LLDB_INVALID_HOST_THREAD;
     return result;
 }
 





More information about the lldb-commits mailing list