kcc at google.com
Tue Dec 27 16:13:15 PST 2011
On Tue, Dec 27, 2011 at 4:00 PM, Joerg Sonnenberger <joerg at britannica.bec.de
> On Tue, Dec 27, 2011 at 12:35:52PM -0800, Kostya Serebryany wrote:
> > 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.
> That's inconsistent :) __builtin_return_address(0) works with or without
> frame pointer. What doesn't work is depending on the frame pointer on
> the stack to "speed up" the unwinding further. So what is it?
Not sure what your question is.
afaict, the method used by asan is the only fast way to get stack traces
(but it requires frame pointers).
All other methods (e.g. libunwind) are much slower.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev