summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_platform_interceptors.h
diff options
context:
space:
mode:
authorMarcos Pividori <mpividori@google.com>2017-02-08 06:31:56 +0000
committerMarcos Pividori <mpividori@google.com>2017-02-08 06:31:56 +0000
commit49779f49caf4c9ba2f1828650cfbb15b294374d3 (patch)
tree6081e2de71b21b72fb3c021b28ca8ce3a929c9ce /lib/sanitizer_common/sanitizer_platform_interceptors.h
parent9a050b3e83389c8962f3baa55097578bf1f3c49f (diff)
[sanitizer] Add weak hooks for Windows.
Add support for weak hooks on Windows, as we do on Linux and Darwin. As we use the macro: `SANITIZER_INTERFACE_WEAK_DEF()` it was not necessary to modify the header file: `sanitizer_common_interceptors.h`. After this diff, many tests were fixed for libFuzzer. Differential Revision: https://reviews.llvm.org/D29562 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294409 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_platform_interceptors.h')
-rw-r--r--lib/sanitizer_common/sanitizer_platform_interceptors.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
index 6ab3d3d6d..50a8dc1ed 100644
--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
+++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
@@ -17,9 +17,11 @@
#include "sanitizer_internal_defs.h"
#if !SANITIZER_WINDOWS
+# define SI_WINDOWS 0
# define SI_NOT_WINDOWS 1
# include "sanitizer_platform_limits_posix.h"
#else
+# define SI_WINDOWS 1
# define SI_NOT_WINDOWS 0
#endif
@@ -310,7 +312,7 @@
#define SANITIZER_INTERCEPT_CTERMID SI_LINUX || SI_MAC || SI_FREEBSD
#define SANITIZER_INTERCEPT_CTERMID_R SI_MAC || SI_FREEBSD
-#define SANITIZER_INTERCEPTOR_HOOKS SI_LINUX || SI_MAC
+#define SANITIZER_INTERCEPTOR_HOOKS SI_LINUX || SI_MAC || SI_WINDOWS
#define SANITIZER_INTERCEPT_RECV_RECVFROM SI_NOT_WINDOWS
#define SANITIZER_INTERCEPT_SEND_SENDTO SI_NOT_WINDOWS
#define SANITIZER_INTERCEPT_EVENTFD_READ_WRITE SI_LINUX