[PATCH] [sanitizer] Expose __sanitizer_print_stack_trace().
Sergey Matveev
earthdok at google.com
Tue Dec 3 03:59:46 PST 2013
================
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
----------------
Alexey Samsonov wrote:
> I think you may just leave -O0 and -O3 here.
done
================
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}}
----------------
Alexey Samsonov wrote:
> Remove trailing .*
done
================
Comment at: lib/asan/asan_stack.cc:49
@@ +48,3 @@
+
+using namespace __asan; // NOLINT
+
----------------
Alexey Samsonov wrote:
> Can we instead use __asan:: in __sanitizer_print_stack_trace (and probably in GET_STACK_TRACE_) macro expansions?
Let's not bloat the macros with this. How about a scoped using directive as a compromise?
http://llvm-reviews.chandlerc.com/D2221
More information about the llvm-commits
mailing list