[Lldb-commits] [PATCH] Prevent deadlock on thread termination
tnorthover at apple.com
Tue Jun 25 12:41:51 PDT 2013
LLDB often segfaults when exiting on my version of Linux. I eventually tracked
this down to the m_read_thread variable being set to 0 during the execution of
Communication::StopReadThread, causing an invalid pthread_join call (with 0
I think the only two threads involved are the stopper and the read thread
itself, which also sets m_read_thread to 0. The attached patch leaves all such
changes to StopReadThread and fixes the issue on my machine.
What I'm not sure of are the consequences if the thread exits naturally. It
looks like you'll get an error one way or the other from trying to read
anyway, but I'm new to the code so could be wrong.
Should I commit?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 657 bytes
Desc: not available
More information about the lldb-commits