On Tue, Dec 27, 2011 at 12:06 PM, Eli Friedman <eli.friedman at gmail.com>wrote:> On Tue, Dec 27, 2011 at 11:48 AM, Kostya Serebryany <kcc at google.com> > wrote: > > Hi, > > > > It looks like the default for -fomit-frame-pointer has recently changed > from > > "no" to "yes at O1 and higher", but I did not see the commit. > > Was that intentional? > > Yes; r146586. >What would be the best fix for asan? Force -mdisable-fp-elim when asan is enabled or document that asan requires -fomit-frame-pointer for better warning messages? Thanks! --kcc> > -Eli >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111227/553e7470/attachment.html>
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? Joerg
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>
> What would be the best fix for asan? > Force -mdisable-fp-elim when asan is enabled or document that asan > requires -fomit-frame-pointer for better warning messages?Just messages? I would suggest documentation. If it is needed by some of the checks then enabling frame pointers by default when asan is enabled and rejecting or warning when someone tries to use both asan and -fomit-frame-pointer is probably better.> Thanks! > > --kcc >Cheers, Rafael
On Tue, Dec 27, 2011 at 1:30 PM, Rafael Ávila de Espíndola < rafael.espindola at gmail.com> wrote:> > What would be the best fix for asan? > > Force -mdisable-fp-elim when asan is enabled or document that asan > > requires -fomit-frame-pointer for better warning messages? > > Just messages?Yes. Asan unwinds stack on every malloc/free and on failure. w/o frame pointers the warning message will be less useful, but the ability to find bugs will not be affected.> I would suggest documentation. >Ok, I'll do that later (if no one else has an opposite opinion). --kcc> > If it is needed by some of the checks then enabling frame pointers by > default when asan is enabled and rejecting or warning when someone tries > to use both asan and -fomit-frame-pointer is probably better. > > > Thanks! > > > > --kcc > > > > Cheers, > Rafael > _______________________________________________ > 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/9ab67e02/attachment.html>