summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-08-08 19:09:48 +0000
committerKamil Rytarowski <n54@gmx.com>2017-08-08 19:09:48 +0000
commit00e8d2ff30476d0d4825d9f16881c64416d3416f (patch)
tree5888b664990e2de87059a0302fe789f3f57cab6c /lib
parent195d1722cd1be21717ee261c5b31a4fa602d961b (diff)
Add NetBSD support in asan_interceptors.cc
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: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36470 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/asan/asan_interceptors.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asan/asan_interceptors.cc b/lib/asan/asan_interceptors.cc
index 1d68a2c0e..b43f12948 100644
--- a/lib/asan/asan_interceptors.cc
+++ b/lib/asan/asan_interceptors.cc
@@ -314,6 +314,11 @@ INTERCEPTOR(int, swapcontext, struct ucontext_t *oucp,
}
#endif // ASAN_INTERCEPT_SWAPCONTEXT
+#if SANITIZER_NETBSD
+#define longjmp __longjmp14
+#define siglongjmp __siglongjmp14
+#endif
+
INTERCEPTOR(void, longjmp, void *env, int val) {
__asan_handle_no_return();
REAL(longjmp)(env, val);