[Pkg-tcltk-devel] Bug#818697: Bug#818697: libtcl8.6: Segv in Tcl_FinalizeNotifier()
Sergei Golovan
sgolovan at nes.ru
Mon Mar 21 11:45:37 UTC 2016
Hi Hirofumi,
On Sun, Mar 20, 2016 at 3:09 PM, OGAWA Hirofumi
<hirofumi at mail.parknet.co.jp> wrote:
>
> I see. Then another candidate is the following.
>
> pthread_mutex_lock(¬ifierInitMutex);
> pthread_mutex_lock(¬ifierMutex);
> pthread_cond_wait(¬ifierCV, ¬ifierMutex);
> pthread_mutex_unlock(¬ifierMutex);
> pthread_mutex_unlock(¬ifierInitMutex);
>
> Because notifierCV is protected by notifierMutex in other places
> (StartNotifierThread and NotifierThreadProc). So without notifierMutex
> lock, it would be wrong way (has possibility of race).
You're right, notifierCV is to be protected by notifierMutex, so this idea
for the fix looks much better. As far as I can see, you've posted the
patch to the upstream bugtracker, thank you. Let's then wait a bit for
the Tcl developers answer.
Cheers!
--
Sergei Golovan
More information about the Pkg-tcltk-devel
mailing list