forked from OSchip/llvm-project
[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 llvm-svn: 354695
This commit is contained in:
parent
ffba00bd47
commit
de7626985f
|
@ -103,7 +103,7 @@ void ReportMmapWriteExec(int prot) {
|
||||||
GET_CALLER_PC_BP_SP;
|
GET_CALLER_PC_BP_SP;
|
||||||
(void)sp;
|
(void)sp;
|
||||||
bool fast = common_flags()->fast_unwind_on_fatal;
|
bool fast = common_flags()->fast_unwind_on_fatal;
|
||||||
if (fast)
|
if (StackTrace::WillUseFastUnwind(fast))
|
||||||
GetThreadStackTopAndBottom(false, &top, &bottom);
|
GetThreadStackTopAndBottom(false, &top, &bottom);
|
||||||
stack->Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, fast);
|
stack->Unwind(kStackTraceMax, pc, bp, nullptr, top, bottom, fast);
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,8 @@ static void OnStackUnwind(const SignalContext &sig, const void *,
|
||||||
uptr top = 0;
|
uptr top = 0;
|
||||||
uptr bottom = 0;
|
uptr bottom = 0;
|
||||||
bool fast = common_flags()->fast_unwind_on_fatal;
|
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);
|
stack->Unwind(kStackTraceMax, sig.pc, sig.bp, sig.context, top, bottom, fast);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ void __ubsan::GetStackTrace(BufferedStackTrace *stack, uptr max_depth, uptr pc,
|
||||||
uptr bp, void *context, bool fast) {
|
uptr bp, void *context, bool fast) {
|
||||||
uptr top = 0;
|
uptr top = 0;
|
||||||
uptr bottom = 0;
|
uptr bottom = 0;
|
||||||
if (fast)
|
if (StackTrace::WillUseFastUnwind(fast))
|
||||||
GetThreadStackTopAndBottom(false, &top, &bottom);
|
GetThreadStackTopAndBottom(false, &top, &bottom);
|
||||||
stack->Unwind(max_depth, pc, bp, context, top, bottom, fast);
|
stack->Unwind(max_depth, pc, bp, context, top, bottom, fast);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
// XFAIL: netbsd && !asan
|
// XFAIL: netbsd && !asan
|
||||||
|
|
||||||
// FIXME(dliew): Make this test work with other sanitizers
|
// FIXME(dliew): Make this test work with TSan
|
||||||
// XFAIL: darwin && (tsan || ubsan)
|
// XFAIL: darwin && tsan
|
||||||
|
|
||||||
volatile int *null = 0;
|
volatile int *null = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue