[Lldb-commits] [PATCH] Prevent deadlock^Wrace on thread termination
tnorthover at apple.com
Thu Jun 27 11:12:15 PDT 2013
On Tuesday 25 June 2013 20:41:51 Tim Northover wrote:
> 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 thread id).
> 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