[PATCH] Remove -fomit-frame-pointer from sanitizers CFLAGS

Alexander Potapenko glider at google.com
Fri Jun 27 09:16:40 PDT 2014


Do you have an example where this really leads to an incorrect stack trace?
Sergey and I asked Kostya about this a couple of times and his point
was that -fomit-frame-pointer produces faster calls, but doesn't
worsen the reports, because the functions from ASan runtime library
are always on top of the stack.

On Thu, Jun 26, 2014 at 5:05 AM, Kuba Brecka <kuba.brecka at gmail.com> wrote:
> Currently, ASan (and other sanitizers) is built with -fomit-frame-pointer, which doesn't go well in combination with stacktrace snapshots that ASan takes. Basically whenever the snapshot contains a no-fp frame, the caller of such a function is missing from the backtrace. I propose to remove this build settings.
>
> http://reviews.llvm.org/D4305
>
> Files:
>   CMakeLists.txt
>
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt
> +++ CMakeLists.txt
> @@ -292,7 +292,6 @@
>  append_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC SANITIZER_COMMON_CFLAGS)
>  append_if(COMPILER_RT_HAS_FNO_BUILTIN_FLAG -fno-builtin SANITIZER_COMMON_CFLAGS)
>  append_if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG -fno-exceptions SANITIZER_COMMON_CFLAGS)
> -append_if(COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG -fomit-frame-pointer SANITIZER_COMMON_CFLAGS)
>  append_if(COMPILER_RT_HAS_FUNWIND_TABLES_FLAG -funwind-tables SANITIZER_COMMON_CFLAGS)
>  append_if(COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG -fno-stack-protector SANITIZER_COMMON_CFLAGS)
>  append_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SANITIZER_COMMON_CFLAGS)
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexander Potapenko
Software Engineer
Google Moscow




More information about the llvm-commits mailing list