From 4d533d243d802d598e340f5796742b2a984304e1 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 15 Nov 2012 08:32:16 +0000 Subject: [PATCH] [ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c The need for this has been reported by Jack Howarth (howarth@bromo.med.uc.edu) who's porting ASan-Darwin to GCC llvm-svn: 168032 --- compiler-rt/lib/interception/mach_override/mach_override.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/interception/mach_override/mach_override.c b/compiler-rt/lib/interception/mach_override/mach_override.c index ba5653c..7511a7b 100644 --- a/compiler-rt/lib/interception/mach_override/mach_override.c +++ b/compiler-rt/lib/interception/mach_override/mach_override.c @@ -725,6 +725,8 @@ static AsmInstructionMatch possibleInstructions[] = { { 0x2, {0xFF, 0x00}, {0x89, 0x00} }, // mov r/m32,r32 or r/m16,r16 { 0x3, {0xFF, 0xFF, 0xFF}, {0x49, 0x89, 0xF8} }, // mov %rdi,%r8 { 0x4, {0xFF, 0xFF, 0xFF, 0xFF}, {0x40, 0x0F, 0xBE, 0xCE} }, // movsbl %sil,%ecx + { 0x7, {0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00}, + {0x48, 0x8D, 0x05, 0x00, 0x00, 0x00, 0x00} }, // lea $imm(%rip),%rax { 0x3, {0xFF, 0xFF, 0xFF}, {0x0F, 0xBE, 0xCE} }, // movsbl, %dh, %ecx { 0x3, {0xFF, 0xFF, 0x00}, {0xFF, 0x77, 0x00} }, // pushq $imm(%rdi) { 0x2, {0xFF, 0xFF}, {0xDB, 0xE3} }, // fninit -- 2.7.4