[llvm-commits] [PATCH][asan] Fix GetFrameNameByAddr to scan for left stack shadow instead of a magic guard value

Evgeniy Stepanov eugeni.stepanov at gmail.com
Sat May 12 05:16:25 PDT 2012


Hi,

in the current implementation AsanThread::GetFrameNameByAddr scans the
stack for a magic guard value to locate base address of the stack
frame. This is not reliable, especially on ARM, where the code that
stores this magic value has to construct it in a register from two
small intermediates; this register can then end up stored in a random
stack location in the prologue of another function.

With this patch, GetFrameNameByAddr scans the shadow memory for the
signature of a left stack redzone instead. It is now possible to
remove the magic from the instrumentation pass for additional
performance gain. We keep it there for now just to make sure the new
algorithm does not fail in some corner case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadow-magic.patch
Type: application/octet-stream
Size: 1805 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120512/28d7acf8/attachment.obj>


More information about the llvm-commits mailing list