summaryrefslogtreecommitdiff
path: root/contrib/compiler-rt/lib/asan/asan_stack.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-02-06 13:39:20 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-02-06 13:39:20 +0000
commitf8ca070d3aeee9332d1843f5aa44945374b51b8e (patch)
tree4efb8604227ede935238eb1c67b626da1265d459 /contrib/compiler-rt/lib/asan/asan_stack.h
parent752d00608cb24d3c902d6890efe6964247c2532c (diff)
parent807551b099338b7cc4f66ee567aae20a529dd27e (diff)
downloadsrc-test2-f8ca070d3aeee9332d1843f5aa44945374b51b8e.tar.gz
src-test2-f8ca070d3aeee9332d1843f5aa44945374b51b8e.zip
Notes
Diffstat (limited to 'contrib/compiler-rt/lib/asan/asan_stack.h')
-rw-r--r--contrib/compiler-rt/lib/asan/asan_stack.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/compiler-rt/lib/asan/asan_stack.h b/contrib/compiler-rt/lib/asan/asan_stack.h
index 122967a152f8..5c5181509801 100644
--- a/contrib/compiler-rt/lib/asan/asan_stack.h
+++ b/contrib/compiler-rt/lib/asan/asan_stack.h
@@ -11,6 +11,7 @@
//
// ASan-private header for asan_stack.cc.
//===----------------------------------------------------------------------===//
+
#ifndef ASAN_STACK_H
#define ASAN_STACK_H
@@ -48,15 +49,15 @@ void GetStackTraceWithPcBpAndContext(BufferedStackTrace *stack, uptr max_depth,
uptr stack_bottom = t->stack_bottom();
ScopedUnwinding unwind_scope(t);
stack->Unwind(max_depth, pc, bp, context, stack_top, stack_bottom, fast);
- } else if (t == 0 && !fast) {
+ } else if (!t && !fast) {
/* If GetCurrentThread() has failed, try to do slow unwind anyways. */
stack->Unwind(max_depth, pc, bp, context, 0, 0, false);
}
}
-#endif // SANITIZER_WINDOWS
+#endif // SANITIZER_WINDOWS
}
-} // namespace __asan
+} // namespace __asan
// NOTE: A Rule of thumb is to retrieve stack trace in the interceptors
// as early as possible (in functions exposed to the user), as we generally
@@ -115,4 +116,4 @@ void GetStackTraceWithPcBpAndContext(BufferedStackTrace *stack, uptr max_depth,
stack.Print(); \
}
-#endif // ASAN_STACK_H
+#endif // ASAN_STACK_H