]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Fix subtle bug in the interaction between pthread_create and thread_wrapper,
authorJulian Seward <jseward@acm.org>
Thu, 20 Jun 2002 10:25:37 +0000 (10:25 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 20 Jun 2002 10:25:37 +0000 (10:25 +0000)
commit7bcbe59c1f3805e5749240192ec5076edd76a9b1
tree45df780ca7e1665748c81ac92d756c944753a3ff
parent711baa5d1c1bbb019f9336c53fe560a5b534421c
Fix subtle bug in the interaction between pthread_create and thread_wrapper,
exposed by scheduling changes caused by commit vg_scheduler.c rev 1.70.
We cannot simply pass the __attr pointer to the child, since it could
point to stuff on the parent's stack, which might not exist by the time
the child looked at it.  Prior to scheduler.c rev 1.70 the child would
have been scheduled as soon as created, so the access was made before the
parent could clear the stuff from its stack.  From rev 1.70 and after
the parent continues after creating the child, causing invalid stack
accesses when the child finally runs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@455
coregrind/arch/x86-linux/vg_libpthread.c
coregrind/vg_libpthread.c
vg_libpthread.c