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 a5019735-40e9-0310-863c-91ae7b9d1cf9
6 files changed