Asm instrumentation does not preserve flags
- Dominant language
- C
- Stars
- 12.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Originally reported on Google Code with 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).
```
Reported by `eugenis@google.com` on 2014-05-07 09:30:02
Contributor guide
Assessment
This issue has not been assessed yet.