summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/msan')
-rw-r--r--compiler-rt/lib/msan/msan.cc32
-rw-r--r--compiler-rt/lib/msan/msan.h3
2 files changed, 17 insertions, 18 deletions
diff --git a/compiler-rt/lib/msan/msan.cc b/compiler-rt/lib/msan/msan.cc
index 25fe9104546..29d58c0a28c 100644
--- a/compiler-rt/lib/msan/msan.cc
+++ b/compiler-rt/lib/msan/msan.cc
@@ -221,21 +221,6 @@ static void InitializeFlags() {
if (f->store_context_size < 1) f->store_context_size = 1;
}
-void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp,
- void *context, bool request_fast_unwind) {
- MsanThread *t = GetCurrentThread();
- if (!t || !StackTrace::WillUseFastUnwind(request_fast_unwind)) {
- // Block reports from our interceptors during _Unwind_Backtrace.
- SymbolizerScope sym_scope;
- return stack->Unwind(max_s, pc, bp, context, 0, 0, false);
- }
- if (StackTrace::WillUseFastUnwind(request_fast_unwind))
- stack->Unwind(max_s, pc, bp, nullptr, t->stack_top(), t->stack_bottom(),
- true);
- else
- stack->Unwind(max_s, pc, 0, context, 0, 0, false);
-}
-
void PrintWarning(uptr pc, uptr bp) {
PrintWarningWithOrigin(pc, bp, __msan_origin_tls);
}
@@ -316,6 +301,23 @@ u32 ChainOrigin(u32 id, StackTrace *stack) {
} // namespace __msan
+void __sanitizer::GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc,
+ uptr bp, void *context,
+ bool request_fast_unwind) {
+ using namespace __msan;
+ MsanThread *t = GetCurrentThread();
+ if (!t || !StackTrace::WillUseFastUnwind(request_fast_unwind)) {
+ // Block reports from our interceptors during _Unwind_Backtrace.
+ SymbolizerScope sym_scope;
+ return stack->Unwind(max_s, pc, bp, context, 0, 0, false);
+ }
+ if (StackTrace::WillUseFastUnwind(request_fast_unwind))
+ stack->Unwind(max_s, pc, bp, nullptr, t->stack_top(), t->stack_bottom(),
+ true);
+ else
+ stack->Unwind(max_s, pc, 0, context, 0, 0, false);
+}
+
// Interface.
using namespace __msan;
diff --git a/compiler-rt/lib/msan/msan.h b/compiler-rt/lib/msan/msan.h
index 3a2769ec709..6d17f50dbd7 100644
--- a/compiler-rt/lib/msan/msan.h
+++ b/compiler-rt/lib/msan/msan.h
@@ -312,9 +312,6 @@ struct SymbolizerScope {
void PrintWarning(uptr pc, uptr bp);
void PrintWarningWithOrigin(uptr pc, uptr bp, u32 origin);
-void GetStackTrace(BufferedStackTrace *stack, uptr max_s, uptr pc, uptr bp,
- void *context, bool request_fast_unwind);
-
// Unpoison first n function arguments.
void UnpoisonParam(uptr n);
void UnpoisonThreadLocalState();
OpenPOWER on IntegriCloud