[Lldb-commits] [PATCH] Prevent deadlock^Wrace on thread termination
Greg Clayton
gclayton at apple.com
Thu Jun 27 12:58:58 PDT 2013
As long as the test suite is happy, I it looks ok to me.
On Jun 27, 2013, at 11:12 AM, Tim Northover <tnorthover at apple.com> wrote:
> Ping?
>
> Tim.
>
> 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?
> <stop-read-thread-race.diff>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list