]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Follow up to bug 345307.
authorIvo Raisr <ivosh@ivosh.net>
Fri, 8 Apr 2016 21:29:15 +0000 (21:29 +0000)
committerIvo Raisr <ivosh@ivosh.net>
Fri, 8 Apr 2016 21:29:15 +0000 (21:29 +0000)
Passing parameter on x86 architecture was wrong in final_tidyup().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15854

coregrind/m_main.c

index 8cfaf820e70c23cd60ed11777efc65e20e67b255..80f347e6c172fd1733268c5e1ec7825287657949 100644 (file)
@@ -2819,9 +2819,9 @@ static void final_tidyup(ThreadId tid)
    /* Pass a parameter to freeres_wrapper(). */
 #  if defined(VGA_x86)
    Addr sp = VG_(threads)[tid].arch.vex.guest_ESP;
-   sp = sp - sizeof(UWord);
    *((UWord *) sp) = to_run;
    VG_TRACK(post_mem_write, Vg_CoreClientReq, tid, sp, sizeof(UWord));
+   sp = sp - sizeof(UWord);
    VG_(threads)[tid].arch.vex.guest_ESP = sp;
    VG_TRACK(post_reg_write, Vg_CoreClientReq, tid,
             offsetof(VexGuestX86State, guest_ESP),