[Lldb-commits] [lldb] r185107 - Prevent race in when stopping a "read thread"
tnorthover at apple.com
Thu Jun 27 14:19:30 PDT 2013
Date: Thu Jun 27 16:19:30 2013
New Revision: 185107
Prevent race in when stopping a "read thread"
Both StopReadThread and the thread being stopped set the thread id to
0 after m_read_thread_enabled was set to false. If the thread being
stopped got there first then StopReadThread called pthread_join on an
invalid thread number. This is not a Good Thing,
Should fix a fairly regular segfault when quitting on Linux.
--- lldb/trunk/source/Core/Communication.cpp (original)
+++ lldb/trunk/source/Core/Communication.cpp Thu Jun 27 16:19:30 2013
@@ -390,8 +390,6 @@ Communication::ReadThread (void *p)
// Let clients know that this thread is exiting
- comm->m_read_thread_enabled = false;
- comm->m_read_thread = LLDB_INVALID_HOST_THREAD;
More information about the lldb-commits