[compiler-rt] r354695 - [Sanitizer] Fix uses of stack->Unwind(..., fast)
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 22 14:00:13 PST 2019
Author: yln
Date: Fri Feb 22 14:00:13 2019
New Revision: 354695
URL: http://llvm.org/viewvc/llvm-project?rev=354695&view=rev
Log:
[Sanitizer] Fix uses of stack->Unwind(..., fast)
Apply StackTrace::WillUseFastUnwind(fast) in a few more places missed by
my previous patch (https://reviews.llvm.org/D58156).
Reviewers: vitalybuka
Differential Revision: https://reviews.llvm.org/D58550
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_report.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_report.cc?rev=354695&r1=354694&r2=354695&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_report.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_report.cc Fri Feb 22 14:00:13 2019
@@ -103,7 +103,7 @@ void ReportMmapWriteExec(int prot) {
GET_CALLER_PC_BP_SP;
(void)sp;
bool fast = common_flags()->fast_unwind_on_fatal;
- if (fast)
+ if (StackTrace::WillUseFastUnwind(fast))
GetThreadStackTopAndBottom(false, &top, &bottom);
stack->Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, fast);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=354695&r1=354694&r2=354695&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Fri Feb 22 14:00:13 2019
@@ -331,7 +331,8 @@ static void OnStackUnwind(const SignalCo
uptr top = 0;
uptr bottom = 0;
bool fast = common_flags()->fast_unwind_on_fatal;
- if (fast) GetThreadStackTopAndBottom(false, &top, &bottom);
+ if (StackTrace::WillUseFastUnwind(fast))
+ GetThreadStackTopAndBottom(false, &top, &bottom);
stack->Unwind(kStackTraceMax, sig.pc, sig.bp, sig.context, top, bottom, fast);
}
Modified: compiler-rt/trunk/lib/ubsan/ubsan_diag.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_diag.cc?rev=354695&r1=354694&r2=354695&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_diag.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_diag.cc Fri Feb 22 14:00:13 2019
@@ -30,7 +30,7 @@ void __ubsan::GetStackTrace(BufferedStac
uptr bp, void *context, bool fast) {
uptr top = 0;
uptr bottom = 0;
- if (fast)
+ if (StackTrace::WillUseFastUnwind(fast))
GetThreadStackTopAndBottom(false, &top, &bottom);
stack->Unwind(max_depth, pc, bp, context, top, bottom, fast);
}
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc?rev=354695&r1=354694&r2=354695&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc Fri Feb 22 14:00:13 2019
@@ -10,8 +10,8 @@
// XFAIL: netbsd && !asan
-// FIXME(dliew): Make this test work with other sanitizers
-// XFAIL: darwin && (tsan || ubsan)
+// FIXME(dliew): Make this test work with TSan
+// XFAIL: darwin && tsan
volatile int *null = 0;
More information about the llvm-commits
mailing list