]> git.ipfire.org Git - thirdparty/valgrind.git/commit
When creating a child thread, initially set its os_state.threadgroup
authorJulian Seward <jseward@acm.org>
Mon, 22 Feb 2010 11:03:10 +0000 (11:03 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 22 Feb 2010 11:03:10 +0000 (11:03 +0000)
commite6c318c531f14697c8b13861fcfada90b2debe89
tree71214a0f475e9650e809759540e1d7c5b8f10f4a
parentd0bb0101785d0e31967deee31877fade1333a6e7
When creating a child thread, initially set its os_state.threadgroup
to have the same value as the parent.  This avoids exit races leading
to hangs and strange behaviour in heavily multithreaded apps, in the
situation where threads are rapidly being created, and at the same
time an existing thread does sys_exit_group so as to terminate the
entire process.  Thanks to Konstantin S for chasing this down to a
small test case.  Fixes #226116.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11053
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm-linux.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-ppc32-linux.c
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c