summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-09-04 14:24:27 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-09-04 14:24:27 +0000
commit2132b704ff72ba0f55793a2faea8323900cb619a (patch)
treef2662928317e3291ec7a4fd62dc118cfda25a01c
parentd53d2686b31f83143a28d53135daaef595f396de (diff)
downloadbcm5719-llvm-2132b704ff72ba0f55793a2faea8323900cb619a.tar.gz
bcm5719-llvm-2132b704ff72ba0f55793a2faea8323900cb619a.zip
Intercept _exit() for sanitizers' needs on FreeBSD
Differential Revision: http://reviews.llvm.org/D5171 llvm-svn: 217156
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
index d4fe18520d4..ed0a534a73b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -29,6 +29,12 @@
# define SI_LINUX_NOT_ANDROID 0
#endif
+#if SANITIZER_FREEBSD
+# define SI_FREEBSD 1
+#else
+# define SI_FREEBSD 0
+#endif
+
#if SANITIZER_LINUX
# define SI_LINUX 1
#else
@@ -196,7 +202,7 @@
// FIXME: getline seems to be available on OSX 10.7
#define SANITIZER_INTERCEPT_GETLINE SI_LINUX_NOT_ANDROID
-#define SANITIZER_INTERCEPT__EXIT SI_LINUX
+#define SANITIZER_INTERCEPT__EXIT SI_LINUX || SI_FREEBSD
#define SANITIZER_INTERCEPT_PHTREAD_MUTEX SI_NOT_WINDOWS
#define SANITIZER_INTERCEPT_PTHREAD_SETNAME_NP SI_LINUX_NOT_ANDROID
OpenPOWER on IntegriCloud