summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan
diff options
context:
space:
mode:
authorJulian Lettner <jlettner@apple.com>2019-05-01 20:57:59 +0000
committerJulian Lettner <jlettner@apple.com>2019-05-01 20:57:59 +0000
commit91c166cbb035a22db1b0ebee7bb760c55c80b77d (patch)
treed9b4ec3871e1422ee31cf3e54905d9dcf6201fa8 /compiler-rt/lib/msan
parent5833bb280f96cc0bc3cce2b19041921ada39d5ce (diff)
downloadbcm5719-llvm-91c166cbb035a22db1b0ebee7bb760c55c80b77d.tar.gz
bcm5719-llvm-91c166cbb035a22db1b0ebee7bb760c55c80b77d.zip
[Sanitizer] Reland "Cleanup INTERCEPT_FUNCTION macro"
On Linux both version of the INTERCEPT_FUNCTION macro now return true when interception was successful. Adapt and cleanup some usages. Also note that `&(func) == &WRAP(func)` is a link-time property, but we do a runtime check. Tested on Linux and macOS. Previous attempt reverted by: 5642c3feb03d020dc06a62e3dc54f3206a97a391 This attempt to bring order to the interceptor macro goes the other direction and aligns the Linux implementation with the way things are done on Windows. Reviewed By: vitalybuka, rnk Differential Revision: https://reviews.llvm.org/D61358 llvm-svn: 359725
Diffstat (limited to 'compiler-rt/lib/msan')
-rw-r--r--compiler-rt/lib/msan/msan_interceptors.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/msan/msan_interceptors.cc b/compiler-rt/lib/msan/msan_interceptors.cc
index f67cfe48916..af9d1402976 100644
--- a/compiler-rt/lib/msan/msan_interceptors.cc
+++ b/compiler-rt/lib/msan/msan_interceptors.cc
@@ -1248,13 +1248,13 @@ int OnExit() {
#define MSAN_INTERCEPT_FUNC(name) \
do { \
- if ((!INTERCEPT_FUNCTION(name) || !REAL(name))) \
+ if (!INTERCEPT_FUNCTION(name)) \
VReport(1, "MemorySanitizer: failed to intercept '" #name "'\n"); \
} while (0)
#define MSAN_INTERCEPT_FUNC_VER(name, ver) \
do { \
- if ((!INTERCEPT_FUNCTION_VER(name, ver) || !REAL(name))) \
+ if (!INTERCEPT_FUNCTION_VER(name, ver)) \
VReport( \
1, "MemorySanitizer: failed to intercept '" #name "@@" #ver "'\n"); \
} while (0)
OpenPOWER on IntegriCloud