summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_stack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/asan/asan_stack.cc')
-rw-r--r--compiler-rt/lib/asan/asan_stack.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/compiler-rt/lib/asan/asan_stack.cc b/compiler-rt/lib/asan/asan_stack.cc
index e4bc424e53b..039261cf2ca 100644
--- a/compiler-rt/lib/asan/asan_stack.cc
+++ b/compiler-rt/lib/asan/asan_stack.cc
@@ -28,29 +28,28 @@ u32 GetMallocContextSize() {
} // namespace __asan
-void __sanitizer::GetStackTrace(BufferedStackTrace *stack, uptr max_depth,
- uptr pc, uptr bp, void *context, bool fast) {
+void __sanitizer::BufferedStackTrace::UnwindImpl(
+ uptr pc, uptr bp, void *context, bool request_fast, u32 max_depth) {
using namespace __asan;
#if SANITIZER_WINDOWS
stack->Unwind(max_depth, pc, 0, context, 0, 0, false);
#else
AsanThread *t;
- stack->size = 0;
+ size = 0;
if (LIKELY(asan_inited)) {
if ((t = GetCurrentThread()) && !t->isUnwinding()) {
uptr stack_top = t->stack_top();
uptr stack_bottom = t->stack_bottom();
ScopedUnwinding unwind_scope(t);
if (!SANITIZER_MIPS || IsValidFrame(bp, stack_top, stack_bottom)) {
- if (StackTrace::WillUseFastUnwind(fast))
- stack->Unwind(max_depth, pc, bp, nullptr, stack_top, stack_bottom,
- true);
+ if (StackTrace::WillUseFastUnwind(request_fast))
+ Unwind(max_depth, pc, bp, nullptr, stack_top, stack_bottom, true);
else
- stack->Unwind(max_depth, pc, 0, context, 0, 0, false);
+ Unwind(max_depth, pc, 0, context, 0, 0, false);
}
- } else if (!t && !fast) {
+ } else if (!t && !request_fast) {
/* If GetCurrentThread() has failed, try to do slow unwind anyways. */
- stack->Unwind(max_depth, pc, bp, context, 0, 0, false);
+ Unwind(max_depth, pc, bp, context, 0, 0, false);
}
}
#endif // SANITIZER_WINDOWS
OpenPOWER on IntegriCloud