[compiler-rt] r310322 - Add NetBSD support in asan_stack.h

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 16:34:45 PDT 2017


Author: kamil
Date: Mon Aug  7 16:34:45 2017
New Revision: 310322

URL: http://llvm.org/viewvc/llvm-project?rev=310322&view=rev
Log:
Add NetBSD support in asan_stack.h

Summary:
Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, kcc, vitalybuka, filcab, fjricci

Reviewed By: vitalybuka

Subscribers: davide, kubamracek, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36377

Modified:
    compiler-rt/trunk/lib/asan/asan_stack.h

Modified: compiler-rt/trunk/lib/asan/asan_stack.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_stack.h?rev=310322&r1=310321&r2=310322&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_stack.h (original)
+++ compiler-rt/trunk/lib/asan/asan_stack.h Mon Aug  7 16:34:45 2017
@@ -44,7 +44,8 @@ void GetStackTraceWithPcBpAndContext(Buf
       // On FreeBSD the slow unwinding that leverages _Unwind_Backtrace()
       // yields the call stack of the signal's handler and not of the code
       // that raised the signal (as it does on Linux).
-      if (SANITIZER_FREEBSD && t->isInDeadlySignal()) fast = true;
+      if ((SANITIZER_FREEBSD || SANITIZER_NETBSD) && t->isInDeadlySignal())
+        fast = true;
       uptr stack_top = t->stack_top();
       uptr stack_bottom = t->stack_bottom();
       ScopedUnwinding unwind_scope(t);




More information about the llvm-commits mailing list