From: Julian Seward Date: Fri, 26 Nov 2004 15:04:24 +0000 (+0000) Subject: When creating a child, copy the parent's .vex/.vex_shadow into it so X-Git-Tag: svn/VALGRIND_3_0_0~1202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45c018217687a15468e1675df562ae448b16da9f;p=thirdparty%2Fvalgrind.git When creating a child, copy the parent's .vex/.vex_shadow into it so as to give it a sane starting state. This may not be the Right Answer, but it fixes regtest failure 'susphello' and doesn't break anything else. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3116 --- diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index fae4554c57..bcaab76235 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -1791,6 +1791,9 @@ void do__apply_in_new_thread ( ThreadId parent_tid, VG_(threads)[tid].status = VgTs_Runnable; /* Copy the parent's CPU state into the child's. */ + VG_(threads)[tid].arch.vex = VG_(threads)[parent_tid].arch.vex; + VG_(threads)[tid].arch.vex_shadow = VG_(threads)[parent_tid].arch.vex_shadow; + /* and let setup_child do any needed target-specific setup. */ VGA_(setup_child)( &VG_(threads)[tid].arch, &VG_(threads)[parent_tid].arch );