[llvm-commits] [PATCH] ASan runtime: Fix the incorrect opcode mask for "mov $imm, %{rax, rdx, rsp, rsi}" in mach_override.c

Alexander Potapenko glider at google.com
Fri Dec 9 01:56:18 PST 2011


The attached patch should fix asan_test64 on Snow Leopard.
The values of ModR/M byte for %rax, %rdx, %rsp, %rsi in this case are
0x04, 0x14, 0x24, 0x34 (see
http://ref.x86asm.net/geek64.html#modrm_byte_32_64),
therefore we should mask them with 0xCF (not 0x3F) to compare with 0x04.

-- 
Alexander Potapenko
Software Engineer
Google Moscow
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mach_override.patch
Type: text/x-patch
Size: 1379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111209/ba586162/attachment.bin>


More information about the llvm-commits mailing list