Add NetBSD support in asan_interceptors.cc
authorKamil Rytarowski <n54@gmx.com>
Tue, 8 Aug 2017 19:09:48 +0000 (19:09 +0000)
committerKamil Rytarowski <n54@gmx.com>
Tue, 8 Aug 2017 19:09:48 +0000 (19:09 +0000)
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

llvm-svn: 310400

compiler-rt/lib/asan/asan_interceptors.cc

index 1d68a2c..b43f129 100644 (file)
@@ -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);