[compiler-rt] r220582 - Add runtime flag 'symbolize_inline_frames' to disable symbolization of inlined frames done in llvm-symbolizer

Will Schmidt will_schmidt at vnet.ibm.com
Mon Oct 27 15:23:31 PDT 2014


On Fri, 2014-10-24 at 18:34 +0000, Alexey Samsonov wrote:
> Author: samsonov
> Date: Fri Oct 24 13:34:43 2014
> New Revision: 220582
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=220582&view=rev
> Log:
> Add runtime flag 'symbolize_inline_frames' to disable symbolization of inlined frames done in llvm-symbolizer
> 

> Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc?rev=220582&r1=220581&r2=220582&view=diff
> ==============================================================================
> --- compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc (original)
> +++ compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc Fri Oct 24 13:34:43 2014
> @@ -1,13 +1,14 @@
>  // RUN: %clangxx -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
>  // RUN: %clangxx -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
> -//
> +// RUN: %tool_options=symbolize_inline_frames=false %run %t 2>&1 | FileCheck %s --check-prefix=NOINLINE
> +

Hi Alexey, 

This one fails for me, in a local build, on ppc64*.  The output from the
run portion ( that gets passed into FileCheck ) looks the same,
regardless of the ASAN_OPTIONS=symbolize_inline_frames=*  value used.
So I'd guess this is an architecture limitation for the moment, but
thats not obvious from the other changes...   Am I missing something
else in my environment here?  (should be all fresh build, etc).

> /home/willschm/llvm_build/native/llvm.cmake/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=address  -O3 /home/willschm/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc -o /home/willschm/llvm_build/native/llvm.cmake/projects/compiler-rt/test/sanitizer_common/asan/Output/print-stack-trace.cc.tmp

> ASAN_OPTIONS=symbolize_inline_frames=true  /home/willschm/llvm_build/native/llvm.cmake/projects/compiler-rt/test/sanitizer_common/asan/Output/print-stack-trace.cc.tmp
    #0 0x100c07dc in __sanitizer_print_stack_trace /home/willschm/llvm/projects/compiler-rt/lib/asan/asan_stack.cc:23
    #1 0x100def70 in FooBarBaz /home/willschm/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc:12:3
    #2 0x100def70 in main /home/willschm/llvm/projects/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc:16
    #3 0x1000003b4cfc in generic_start_main /build/buildd/eglibc-2.19/csu/../csu/libc-start.c:287

Thanks, 
-Will


>  // Not yet implemented for TSan.
>  // https://code.google.com/p/address-sanitizer/issues/detail?id=243
>  // XFAIL: tsan
> 
>  #include <sanitizer/common_interface_defs.h>
> 
> -void FooBarBaz() {
> +static inline void FooBarBaz() {
>    __sanitizer_print_stack_trace();
>  }
> 
> @@ -16,5 +17,8 @@ int main() {
>    return 0;
>  }
>  // CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
> -// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*print-stack-trace.cc:11}}
> -// CHECK: {{    #2 0x.* in main.*print-stack-trace.cc:15}}
> +// CHECK: {{    #1 0x.* in FooBarBaz(\(\))? .*print-stack-trace.cc:12}}
> +// CHECK: {{    #2 0x.* in main.*print-stack-trace.cc:16}}
> +
> +// NOINLINE: #0 0x{{.*}} in __sanitizer_print_stack_trace
> +// NOINLINE: #1 0x{{.*}} in main{{.*}}print-stack-trace.cc:12









More information about the llvm-commits mailing list