[PATCH] D61204: [Sanitizer] Cleanup {ASAN, MSAN}_INTERCEPT_FUNC[_VER] macro
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 09:38:24 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT359466: [Sanitizer] Cleanup {ASAN, MSAN}_INTERCEPT_FUNC[_VER] macro (authored by yln, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D61204?vs=196887&id=197133#toc
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61204/new/
https://reviews.llvm.org/D61204
Files:
lib/asan/asan_interceptors.h
lib/msan/msan_interceptors.cc
Index: lib/msan/msan_interceptors.cc
===================================================================
--- lib/msan/msan_interceptors.cc
+++ lib/msan/msan_interceptors.cc
@@ -1244,8 +1244,7 @@
#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 @@
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)
Index: lib/asan/asan_interceptors.h
===================================================================
--- lib/asan/asan_interceptors.h
+++ lib/asan/asan_interceptors.h
@@ -123,15 +123,13 @@
#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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61204.197133.patch
Type: text/x-patch
Size: 2751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190429/cd79c2db/attachment.bin>
More information about the llvm-commits
mailing list