[lldb-dev] Process::SyncIOHandler(), everyone please try out the following patch

Ed Maste emaste at freebsd.org
Mon May 11 08:20:18 PDT 2015


On 11 May 2015 at 10:21, Pavel Labath <labath at google.com> wrote:
>
> BTW, I've noticed that PushIOHandler does not lock
> m_input_reader_stack.GetMutex(), unlike PopIOHandler, and all other
> functions which deal with handlers. Is that intentional? I think it
> should lock the mutex as well.

A slight tangent here, but there's a lot of dubious thread behaviour
like this. One example I've run into is PR22611 - I see that if we set
a prompt that fits in libc++'s short string optimization (that is, no
more than 22 characters) it works fine, but as soon as the prompt is
23 characters long we end up pointing at uninitialized memory;
presumably the race window is much larger in that case.

Unfortunately TSan isn't fully functional on FreeBSD at the moment, so
it's not that easy for me to find other cases like this with a
systematic approach. I recall there was an effort to run LLDB under
TSan on Linux some time ago, and that found a number of issues. Is
anyone on the Linux side interested in picking that up again?



More information about the lldb-dev mailing list