[LLVMdev] -f[no-]omit-frame-pointer

Kostya Serebryany kcc at google.com
Tue Dec 27 12:35:52 PST 2011


On Tue, Dec 27, 2011 at 12:22 PM, Joerg Sonnenberger <
joerg at britannica.bec.de> wrote:

> On Tue, Dec 27, 2011 at 12:10:54PM -0800, Kostya Serebryany wrote:
> > What would be the best fix for asan?
>
> Can you be explicit what you need to asan? Just the equivalent of
> __builtin_return_address(0) or do you really need a full stack trace?
>

asan-rt uses __builtin_return_address(0) to get the full stack trace.
See compiler-rt/lib/asan/asan_stack.cc (AsanStackTrace::FastUnwindStack)
It checks the current thread's stack bounds to avoid a wild dereference.

Asan does not use unsafe __builtin_return_address(N, N>0), although it
would be nice if __builtin_return_address(N, N>0) had safer semantics.

--kcc



>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111227/922b6a00/attachment.html>


More information about the llvm-dev mailing list