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