[PATCH] D37657: [ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with other sanitizers
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 13:03:02 PDT 2017
vitalybuka updated this revision to Diff 114658.
vitalybuka added a comment.
Herald added a subscriber: mgorny.
Rebase
https://reviews.llvm.org/D37657
Files:
compiler-rt/lib/ubsan/ubsan_diag_standalone.cc
compiler-rt/lib/ubsan/ubsan_flags.cc
compiler-rt/test/sanitizer_common/CMakeLists.txt
compiler-rt/test/sanitizer_common/TestCases/options-include.cc
compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc
Index: compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc
+++ compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc
@@ -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>
Index: compiler-rt/test/sanitizer_common/TestCases/options-include.cc
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/options-include.cc
+++ compiler-rt/test/sanitizer_common/TestCases/options-include.cc
@@ -1,5 +1,4 @@
// RUN: %clangxx -O0 %s -o %t
-// UNSUPPORTED: ubsan
// Recursive include: options1 includes options2
// RUN: echo "symbolize=1" > %t.options1.txt
Index: compiler-rt/test/sanitizer_common/CMakeLists.txt
===================================================================
--- compiler-rt/test/sanitizer_common/CMakeLists.txt
+++ compiler-rt/test/sanitizer_common/CMakeLists.txt
@@ -8,9 +8,9 @@
list(APPEND SUPPORTED_TOOLS asan)
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
- list(APPEND SUPPORTED_TOOLS tsan)
- list(APPEND SUPPORTED_TOOLS msan)
- list(APPEND SUPPORTED_TOOLS lsan)
+ # list(APPEND SUPPORTED_TOOLS tsan)
+ # list(APPEND SUPPORTED_TOOLS msan)
+ # list(APPEND SUPPORTED_TOOLS lsan)
list(APPEND SUPPORTED_TOOLS ubsan)
endif()
Index: compiler-rt/lib/ubsan/ubsan_flags.cc
===================================================================
--- compiler-rt/lib/ubsan/ubsan_flags.cc
+++ compiler-rt/lib/ubsan/ubsan_flags.cc
@@ -53,8 +53,8 @@
f->SetDefaults();
FlagParser parser;
- RegisterCommonFlags(&parser);
RegisterUbsanFlags(&parser, f);
+ RegisterCommonFlags(&parser);
// Override from user-specified string.
parser.ParseString(MaybeCallUbsanDefaultOptions());
Index: compiler-rt/lib/ubsan/ubsan_diag_standalone.cc
===================================================================
--- compiler-rt/lib/ubsan/ubsan_diag_standalone.cc
+++ compiler-rt/lib/ubsan/ubsan_diag_standalone.cc
@@ -26,9 +26,10 @@
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();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37657.114658.patch
Type: text/x-patch
Size: 2673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170911/5bc3da6c/attachment.bin>
More information about the llvm-commits
mailing list