]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When creating a child, copy the parent's .vex/.vex_shadow into it so
authorJulian Seward <jseward@acm.org>
Fri, 26 Nov 2004 15:04:24 +0000 (15:04 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 26 Nov 2004 15:04:24 +0000 (15:04 +0000)
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

coregrind/vg_scheduler.c

index fae4554c57df5fb2c2f3aa0913e06989af6c0da3..bcaab762355b72e8b1521fbc1051efc8cac984a0 100644 (file)
@@ -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 );