summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/asan_interceptors.h6
-rw-r--r--compiler-rt/lib/msan/msan_interceptors.cc5
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors.h b/compiler-rt/lib/asan/asan_interceptors.h
index d4a68e26717..f0deea391d0 100644
--- a/compiler-rt/lib/asan/asan_interceptors.h
+++ b/compiler-rt/lib/asan/asan_interceptors.h
@@ -123,15 +123,13 @@ DECLARE_REAL(char*, strstr, const char *s1, const char *s2)
#define ASAN_INTERCEPT_FUNC(name) \
do { \
INTERCEPT_FUNCTION(name); \
- bool same = (& (name) == & WRAP(name)); \
- if ((!same || !REAL(name))) \
+ if (&(name) != &WRAP(name) || !REAL(name)) \
VReport(1, "AddressSanitizer: failed to intercept '" #name "'\n"); \
} while (0)
#define ASAN_INTERCEPT_FUNC_VER(name, ver) \
do { \
INTERCEPT_FUNCTION_VER(name, ver); \
- name##_type ptr = (::__interception::real_##name); \
- if ((!ptr || !REAL(name))) \
+ if (&(name) != &WRAP(name) || !REAL(name)) \
VReport( \
1, "AddressSanitizer: failed to intercept '" #name "@@" #ver "'\n"); \
} while (0)
diff --git a/compiler-rt/lib/msan/msan_interceptors.cc b/compiler-rt/lib/msan/msan_interceptors.cc
index 0512d70d7dc..46fbb0f1bb1 100644
--- a/compiler-rt/lib/msan/msan_interceptors.cc
+++ b/compiler-rt/lib/msan/msan_interceptors.cc
@@ -1244,8 +1244,7 @@ int OnExit() {
#define MSAN_INTERCEPT_FUNC(name) \
do { \
INTERCEPT_FUNCTION(name); \
- bool same = (& (name) == & WRAP(name)); \
- if ((!same || !REAL(name))) \
+ if (&(name) != &WRAP(name) || !REAL(name)) \
VReport(1, "MemorySanitizer: failed to intercept '" #name "'\n"); \
} while (0)
@@ -1253,7 +1252,7 @@ int OnExit() {
do { \
INTERCEPT_FUNCTION_VER(name, ver); \
name##_type ptr = (::__interception::real_##name); \
- if ((!ptr || !REAL(name))) \
+ if (&(name) != &WRAP(name) || !REAL(name)) \
VReport( \
1, "MemorySanitizer: failed to intercept '" #name "@@" #ver "'\n"); \
} while (0)
OpenPOWER on IntegriCloud