From: Julian Seward Date: Mon, 16 May 2011 11:49:40 +0000 (+0000) Subject: Reorder tests poking around in the x86 instruction stream (sigh) X-Git-Tag: svn/VALGRIND_3_7_0~476 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa642b19c59e3e660f92b2ef4a6dbe9ae4cb81a2;p=thirdparty%2Fvalgrind.git Reorder tests poking around in the x86 instruction stream (sigh) in order to try and avoid segfaults when we back up over a page boundary. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11761 --- diff --git a/exp-sgcheck/sg_main.c b/exp-sgcheck/sg_main.c index f125abe839..ea384c945d 100644 --- a/exp-sgcheck/sg_main.c +++ b/exp-sgcheck/sg_main.c @@ -2135,9 +2135,9 @@ static void instrument_mem_access ( struct _SGEnv* sge, #if defined(VGA_x86) { UChar* p = (UChar*)curr_IP; // pop %ebp; RET - if (p[-1] == 0x5d && p[0] == 0xc3) return; + if (p[0] == 0xc3 && p[-1] == 0x5d) return; // pop %ebp; RET $imm16 - if (p[-1] == 0x5d && p[0] == 0xc2) return; + if (p[0] == 0xc2 && p[-1] == 0x5d) return; // PUSH %EBP; mov %esp,%ebp if (p[0] == 0x55 && p[1] == 0x89 && p[2] == 0xe5) return; }