[PATCH] D18121: [sanitizer] On OS X, verify that interceptors work and abort if not

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 21:58:44 PST 2016


filcab added a subscriber: filcab.

================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:636
@@ +635,3 @@
+  CHECK(dladdr(dlopen_addr, &info_pthread_create));
+  if (internal_strcmp(info.dli_fname, info_pthread_create.dli_fname) != 0) {
+    Report(
----------------
Wouldn't `if (info.dli_fbase != info_pthread_create.dli_fbase)` work as well? Seems easier to read.

================
Comment at: test/tsan/Darwin/dlopen.cc:12
@@ +11,3 @@
+
+// RUN: IS_OSX_10_11_OR_HIGHER=$([ `sw_vers -productVersion | cut -d'.' -f2` -lt 11 ]; echo $?)
+// RUN: TSAN_DYLIB_PATH=`%clangxx_tsan %s -### 2>&1 \
----------------
I really think this would be better in the lit.cfg files (and then dealt with via REQUIRES/UNSUPPORTED), instead of having tests depend on more and more available executables/specific shells.
Having said that, I don't see it as a very big problem because it's a Darwin-specific test (Still hinders to do that, anyway :-) )


http://reviews.llvm.org/D18121





More information about the llvm-commits mailing list