forked from OSchip/llvm-project
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. llvm-svn: 185107
This commit is contained in:
parent
28e84fc53e
commit
0614fcd0e3
|
@ -390,8 +390,6 @@ Communication::ReadThread (void *p)
|
|||
|
||||
// Let clients know that this thread is exiting
|
||||
comm->BroadcastEvent (eBroadcastBitReadThreadDidExit);
|
||||
comm->m_read_thread_enabled = false;
|
||||
comm->m_read_thread = LLDB_INVALID_HOST_THREAD;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue