[PATCH] D58947: Restore logic broken by D58861
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 18:13:11 PST 2019
vitalybuka created this revision.
vitalybuka added a reviewer: yln.
Herald added subscribers: llvm-commits, Sanitizers, kubamracek.
Herald added projects: Sanitizers, LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D58947
Files:
compiler-rt/lib/asan/asan_stack.cc
Index: compiler-rt/lib/asan/asan_stack.cc
===================================================================
--- compiler-rt/lib/asan/asan_stack.cc
+++ compiler-rt/lib/asan/asan_stack.cc
@@ -35,10 +35,17 @@
if (UNLIKELY(!asan_inited)) return;
AsanThread *t = GetCurrentThread();
- if (t && !t->isUnwinding() && WillUseFastUnwind(request_fast)) {
+ if (!t || t->isUnwinding()) {
+#if SANITIZER_CAN_SLOW_UNWIND
+ UnwindSlowWithOptionalContext(pc, context, max_depth);
+#endif
+ return;
+ }
+
+ ScopedUnwinding unwind_scope(t);
+ if (WillUseFastUnwind(request_fast)) {
uptr top = t->stack_top();
uptr bottom = t->stack_bottom();
- ScopedUnwinding unwind_scope(t);
if (!SANITIZER_MIPS || IsValidFrame(bp, top, bottom)) {
UnwindFast(pc, bp, top, bottom, max_depth);
return;
@@ -46,7 +53,7 @@
}
#if SANITIZER_CAN_SLOW_UNWIND
- UnwindSlowWithOptionalContext(pc, context, max_depth);
+ UnwindSlowWithOptionalContext(pc, context, max_depth);
#endif
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58947.189257.patch
Type: text/x-patch
Size: 1008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190305/c27da662/attachment.bin>
More information about the llvm-commits
mailing list