<br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 12:22 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tue, Dec 27, 2011 at 12:10:54PM -0800, Kostya Serebryany wrote:<br>
> What would be the best fix for asan?<br>
<br>
</div>Can you be explicit what you need to asan? Just the equivalent of<br>
__builtin_return_address(0) or do you really need a full stack trace?<br></blockquote><div><br></div><div>asan-rt uses __builtin_return_address(0) to get the full stack trace. </div><div>See compiler-rt/lib/asan/asan_stack.cc (AsanStackTrace::FastUnwindStack)</div>
<div>It checks the current thread's stack bounds to avoid a wild dereference. </div><div><br></div><div>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. </div>
<div><br></div><div>--kcc </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joerg<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br>