diff options
-rw-r--r-- | compiler-rt/lib/asan/asan_win_dll_thunk.cc | 3 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_win_dll_thunk.cc b/compiler-rt/lib/asan/asan_win_dll_thunk.cc index eff00f9f941..725ead1ac47 100644 --- a/compiler-rt/lib/asan/asan_win_dll_thunk.cc +++ b/compiler-rt/lib/asan/asan_win_dll_thunk.cc @@ -21,6 +21,7 @@ #ifdef ASAN_DLL_THUNK #include "asan_init_version.h" #include "interception/interception.h" +#include "sanitizer_common/sanitizer_platform_interceptors.h" // ---------- Function interception helper functions and macros ----------- {{{1 extern "C" { @@ -390,7 +391,9 @@ INTERCEPTOR(int, _except_handler4, void *a, void *b, void *c, void *d) { INTERCEPT_LIBRARY_FUNCTION(frexp); INTERCEPT_LIBRARY_FUNCTION(longjmp); +#if SANITIZER_INTERCEPT_MEMCHR INTERCEPT_LIBRARY_FUNCTION(memchr); +#endif INTERCEPT_LIBRARY_FUNCTION(memcmp); INTERCEPT_LIBRARY_FUNCTION(memcpy); INTERCEPT_LIBRARY_FUNCTION(memmove); diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index 27233eeff35..0e70a18007c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -83,10 +83,9 @@ #define SANITIZER_INTERCEPT_MEMMOVE 1 #define SANITIZER_INTERCEPT_MEMCPY 1 #define SANITIZER_INTERCEPT_MEMCMP 1 -// TODO(wwchrome): Re-enable intercepting memchr() when ready. // The function memchr() contains a jump in the first 6 bytes // that is problematic to intercept correctly on Win64. -// Disable memchr() interception for Win64 temporarily. +// Disable memchr() interception for Win64. #if SANITIZER_WINDOWS64 #define SANITIZER_INTERCEPT_MEMCHR 0 #else |