summaryrefslogtreecommitdiff
path: root/lib/lsan
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsan')
-rw-r--r--lib/lsan/lsan.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/lsan/lsan.h b/lib/lsan/lsan.h
index 53783cdc9..f6f7a1b10 100644
--- a/lib/lsan/lsan.h
+++ b/lib/lsan/lsan.h
@@ -20,12 +20,14 @@
{ \
uptr stack_top = 0, stack_bottom = 0; \
ThreadContext *t; \
- if (fast && (t = CurrentThreadContext())) { \
+ if ((t = CurrentThreadContext())) { \
stack_top = t->stack_end(); \
stack_bottom = t->stack_begin(); \
} \
- stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
- /* context */ 0, stack_top, stack_bottom, fast); \
+ if (IsValidFrame(GET_CURRENT_FRAME(), stack_top, stack_bottom)) { \
+ stack.Unwind(max_size, StackTrace::GetCurrentPc(), GET_CURRENT_FRAME(), \
+ /* context */ 0, stack_top, stack_bottom, fast); \
+ } \
}
#define GET_STACK_TRACE_FATAL \