DynamoRIO / DynamoRIO/drmemory
-zero_stack conflicts with stack redzone
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [bruen...@google.com](https://code.google.com/u/109494838902877177630/) on May 01, 2013 15:22:26_
split from issue #111 currently, -zero_stack zeroes out on alloc of frame. and some funcs write
before allocating (example from Qin):
0x7f8c0596afc0 <_IO_new_file_xsputn>: mov %rbx,-0x28(%rsp)
0x7f8c0596afc5 <_IO_new_file_xsputn+5>: mov %rbp,-0x20(%rsp)
0x7f8c0596afca <_IO_new_file_xsputn+10>: xor %eax,%eax
0x7f8c0596afcc <_IO_new_file_xsputn+12>: mov % r12 ,-0x18(%rsp)
0x7f8c0596afd1 <_IO_new_file_xsputn+17>: mov % r13 ,-0x10(%rsp)
0x7f8c0596afd6 <_IO_new_file_xsputn+22>: mov %rdi,%rbp
0x7f8c0596afd9 <_IO_new_file_xsputn+25>: mov % r14 ,-0x8(%rsp)
0x7f8c0596afde <_IO_new_file_xsputn+30>: sub $0x28,%rsp
could switch to zero on de-alloc: though code might de-alloc and still
reference in redzone beyond rsp.
can certainly zero beyond 128 on alloc or de-alloc but that only affects
big frames
could zero fixed distance on entering callee: if I'm not a leaf function,
and I call foo(), I have to expect that foo might clobber the whole stack
redzone. won't get all stale values, but can perhaps get many of them.
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=1205_
Contributor guide
Assessment
This issue has not been assessed yet.