[PATCH] [sanitizer] Expose __sanitizer_print_stack_trace().

Alexey Samsonov samsonov at google.com
Tue Dec 3 03:13:11 PST 2013



================
Comment at: lib/asan/lit_tests/TestCases/print-stack-trace.cc:16
@@ +15,3 @@
+}
+// CHECK: {{    #0 0x.* in __sanitizer_print_stack_trace .*}}
+// CHECK: {{    #1 0x.* in FooBarBaz\(\) .*print-stack-trace.cc:9}}
----------------
Remove trailing .*

================
Comment at: lib/asan/lit_tests/TestCases/print-stack-trace.cc:2
@@ +1,3 @@
+// RUN: %clangxx_asan -O0 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O2 %s -o %t && %t 2>&1 | FileCheck %s
----------------
I think you may just leave -O0 and -O3 here.

================
Comment at: lib/asan/asan_stack.cc:49
@@ +48,3 @@
+
+using namespace __asan;  // NOLINT
+
----------------
Can we instead use __asan:: in __sanitizer_print_stack_trace (and probably in GET_STACK_TRACE_) macro expansions?


http://llvm-reviews.chandlerc.com/D2221



More information about the llvm-commits mailing list