From: Julian Seward Date: Sun, 11 May 2008 10:11:58 +0000 (+0000) Subject: Compute the starting address of the instruction correctly. This has X-Git-Tag: svn/VALGRIND_3_4_1^2~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c826961f31b2ee5b6ea20b15024ec6c0ddbe8a1;p=thirdparty%2Fvalgrind.git Compute the starting address of the instruction correctly. This has 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 --- diff --git a/VEX/priv/guest-x86/toIR.c b/VEX/priv/guest-x86/toIR.c index fb3580f8b5..ddf571b4cf 100644 --- a/VEX/priv/guest-x86/toIR.c +++ b/VEX/priv/guest-x86/toIR.c @@ -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++;