[compiler-rt] r312954 - [ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with other sanitizers

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 14:25:22 PDT 2017


Author: vitalybuka
Date: Mon Sep 11 14:25:22 2017
New Revision: 312954

URL: http://llvm.org/viewvc/llvm-project?rev=312954&view=rev
Log:
[ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with other sanitizers

Summary: Other sanitizers include __sanitizer_print_stack_trace into stack trace.

Reviewers: eugenis, alekseyshl

Subscribers: llvm-commits, kubamracek

Differential Revision: https://reviews.llvm.org/D37657

Modified:
    compiler-rt/trunk/lib/ubsan/ubsan_diag_standalone.cc
    compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc

Modified: compiler-rt/trunk/lib/ubsan/ubsan_diag_standalone.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_diag_standalone.cc?rev=312954&r1=312953&r2=312954&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag_standalone.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag_standalone.cc Mon Sep 11 14:25:22 2017
@@ -26,9 +26,10 @@ void __sanitizer_print_stack_trace() {
   if (request_fast_unwind)
     __sanitizer::GetThreadStackTopAndBottom(false, &top, &bottom);
 
-  GET_REPORT_OPTIONS(false);
+  GET_CURRENT_PC_BP_SP;
+  (void)sp;
   BufferedStackTrace stack;
-  stack.Unwind(kStackTraceMax, Opts.pc, Opts.bp, nullptr, top, bottom,
+  stack.Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom,
                request_fast_unwind);
   stack.Print();
 }

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=312954&r1=312953&r2=312954&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 Mon Sep 11 14:25:22 2017
@@ -4,7 +4,6 @@
 // RUN: %env_tool_opts=symbolize_inline_frames=false:stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s --check-prefix=NOINLINE
 
 // UNSUPPORTED: darwin
-// XFAIL: ubsan
 
 #include <sanitizer/common_interface_defs.h>
 




More information about the llvm-commits mailing list