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

Kostya Serebryany kcc at google.com
Sat May 12 05:27:39 PDT 2012


Looks good, thanks!

--kcc



On Sat, May 12, 2012 at 4:16 PM, Evgeniy Stepanov <eugeni.stepanov at gmail.com
> wrote:

> 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.
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120512/854e9dba/attachment.html>


More information about the llvm-commits mailing list