Home | History | Annotate | Download | only in TestCases
      1 // RUN: %clangxx -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
      2 // RUN: %clangxx -O3 %s -o %t && %run %t 2>&1 | FileCheck %s
      3 //
      4 // Not yet implemented for TSan.
      5 // https://code.google.com/p/address-sanitizer/issues/detail?id=243
      6 // XFAIL: tsan,lsan
      7 
      8 #include <sanitizer/common_interface_defs.h>
      9 
     10 void FooBarBaz() {
     11   __sanitizer_print_stack_trace();
     12 }
     13 
     14 int main() {
     15   FooBarBaz();
     16   return 0;
     17 }
     18 // CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace}}
     19 // CHECK: {{    #1 0x.* in FooBarBaz\(\) .*print-stack-trace.cc:11}}
     20 // CHECK: {{    #2 0x.* in main.*print-stack-trace.cc:15}}
     21