]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Compute the starting address of the instruction correctly. This has
authorJulian Seward <jseward@acm.org>
Sun, 11 May 2008 10:11:58 +0000 (10:11 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 11 May 2008 10:11:58 +0000 (10:11 +0000)
always been wrong and can cause the next-instruction-address to be
wrong in obscure circumstances.  Fixes #152818.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1838

VEX/priv/guest-x86/toIR.c

index fb3580f8b5f86d162eca3c50b28bd24ad5d4c37f..ddf571b4cf428db79b4facb12bafc599a57d5062 100644 (file)
@@ -13347,7 +13347,7 @@ DisResult disInstr_X86_WRK (
 
    /* REPNE prefix insn */
    case 0xF2: { 
-      Addr32 eip_orig = guest_EIP_bbstart + delta - 1;
+      Addr32 eip_orig = guest_EIP_bbstart + delta_start;
       if (sorb != 0) goto decode_failure;
       abyte = getIByte(delta); delta++;
 
@@ -13390,7 +13390,7 @@ DisResult disInstr_X86_WRK (
    /* REP/REPE prefix insn (for SCAS and CMPS, 0xF3 means REPE,
       for the rest, it means REP) */
    case 0xF3: { 
-      Addr32 eip_orig = guest_EIP_bbstart + delta - 1;
+      Addr32 eip_orig = guest_EIP_bbstart + delta_start;
       if (sorb != 0) goto decode_failure;
       abyte = getIByte(delta); delta++;