diff options
author | Reid Kleckner <rnk@google.com> | 2019-04-30 20:59:56 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2019-04-30 20:59:56 +0000 |
commit | 56d59bd9cdbd18d00d2b487812e19ff7302201c7 (patch) | |
tree | 0085f5061aec19ff1ad313fccfdc02e55af96aa3 /lib/msan | |
parent | 0128c9bfa882ac8ca16929201352e3d8bea9aff8 (diff) | |
download | compiler-rt-56d59bd9cdbd18d00d2b487812e19ff7302201c7.tar.gz |
Revert r359325 "[NFC][Sanitizer] Change "return type" of INTERCEPT_FUNCTION to void"
Changing INTERCEPT_FUNCTION to return void is not functionally correct.
IMO the best way to communicate failure or success of interception is
with a return value, not some external address comparison.
This change was also creating link errors for _except_handler4_common,
which is exported from ucrtbase.dll in 32-bit Windows.
Also revert dependent changes r359362 and r359466.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan')
-rw-r--r-- | lib/msan/msan_interceptors.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/msan/msan_interceptors.cc b/lib/msan/msan_interceptors.cc index 46fbb0f1b..f5120809e 100644 --- a/lib/msan/msan_interceptors.cc +++ b/lib/msan/msan_interceptors.cc @@ -1243,16 +1243,13 @@ int OnExit() { #define MSAN_INTERCEPT_FUNC(name) \ do { \ - INTERCEPT_FUNCTION(name); \ - if (&(name) != &WRAP(name) || !REAL(name)) \ + if ((!INTERCEPT_FUNCTION(name) || !REAL(name))) \ VReport(1, "MemorySanitizer: failed to intercept '" #name "'\n"); \ } while (0) #define MSAN_INTERCEPT_FUNC_VER(name, ver) \ do { \ - INTERCEPT_FUNCTION_VER(name, ver); \ - name##_type ptr = (::__interception::real_##name); \ - if (&(name) != &WRAP(name) || !REAL(name)) \ + if ((!INTERCEPT_FUNCTION_VER(name, ver) || !REAL(name))) \ VReport( \ 1, "MemorySanitizer: failed to intercept '" #name "@@" #ver "'\n"); \ } while (0) |