[PATCH] D61145: [NFC][Sanitizer] Change "return type" of INTERCEPT_FUNCTION to void

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 13:39:50 PDT 2019


yln marked 2 inline comments as done.
yln added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_interceptors.h:127
+    bool same = (& (name) == & WRAP(name));                              \
+    if ((!same || !REAL(name)))                                          \
       VReport(1, "AddressSanitizer: failed to intercept '" #name "'\n"); \
----------------
You said this protects against "double interception"?
If this works as expected, then should we push it up into INTERCEPT_FUNCTION?
Why do we only protect against "double interception" in ASan and MSan, but not the other sanitizers?

My best guess is that this has been obsolete for a while.


================
Comment at: compiler-rt/lib/asan/asan_interceptors.h:134
+    name##_type ptr = (::__interception::real_##name);                         \
+    if ((!ptr || !REAL(name)))                                                 \
       VReport(                                                                 \
----------------
Note that this is different from above, it's essentially:  `(!REAL(name) || !REAL(name))`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61145/new/

https://reviews.llvm.org/D61145





More information about the llvm-commits mailing list