Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Defect Priority-Medium

New issue 307 by [email protected]: Asm instrumentation does not preserve flags
http://code.google.com/p/address-sanitizer/issues/detail?id=307

   0x00007fbddec82e6c <+44>:    sub    $0x80,%rsp
   0x00007fbddec82e73 <+51>:    push   %rdi
   0x00007fbddec82e74 <+52>:    lea    (%rsi),%rdi
0x00007fbddec82e77 <+55>: callq 0x7fbddec66380 <__sanitizer_sanitize_store4@plt>
   0x00007fbddec82e7c <+60>:    pop    %rdi
=> 0x00007fbddec82e7d <+61>:    add    $0x80,%rsp

^^^ This instruction clobbers flags.

(gdb) disassemble __sanitizer_sanitize_store4
Dump of assembler code for function __sanitizer_sanitize_store4:
   0x00000000004a9a48 <+0>:     sub    $0x80,%rsp

^^^ This instruction clobbers flags, too.

   0x00000000004a9a4f <+7>:     push   %rax
   0x00000000004a9a50 <+8>:     push   %rcx
   0x00000000004a9a51 <+9>:     pushfq

^^^ This pushfq is too late (and corresponding popfq is too early).


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to