From fa642b19c59e3e660f92b2ef4a6dbe9ae4cb81a2 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 16 May 2011 11:49:40 +0000 Subject: [PATCH] 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 --- exp-sgcheck/sg_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.2