[PATCH] tsan: ignore interceptors coming from specified libraries

Alexander Potapenko glider at google.com
Wed Oct 2 07:40:33 PDT 2013



================
Comment at: msan/msan_interceptors.cc:1133
@@ -1132,2 +1132,3 @@
   ctx = (void *)&msan_ctx;                                    \
+  (void)ctx;                                                  \
   InterceptorScope interceptor_scope;                         \
----------------
IIUC this file doesn't belong to this CL.
If so, please commit it separately.

================
Comment at: sanitizer_common/sanitizer_libignore.h:35
@@ +34,3 @@
+  // Must be called after a new dynamic library is loaded.
+  void OnLibraryLoaded();
+
----------------
Shouldn't we support dlclose()? Otherwise you may end up having overlapping and/or nesting ranges.

================
Comment at: sanitizer_common/sanitizer_libignore.h:10
@@ +9,3 @@
+//
+// LibIgnore allows to ignore all interceptors called from a particular set
+// of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions
----------------
I suggest 'IgnoreLib' or anything else instead of 'LibIgnore', since 'libignore' associates with 'library named ignore'.

================
Comment at: sanitizer_common/sanitizer_common_interceptors.inc:1142
@@ -1141,3 +1141,3 @@
 
-INTERCEPTOR(struct __sanitizer_hostent *, gethostent) {
+INTERCEPTOR(struct __sanitizer_hostent *, gethostent, int fake) {
   void *ctx;
----------------
Do these interceptors belong to this CL?

================
Comment at: sanitizer_common/sanitizer_libignore.cc:26
@@ +25,3 @@
+      continue;
+    CHECK_LT(count_, kMaxLibs);
+    Lib *lib = &libs_[count_++];
----------------
I don't think we must bail out if the number of suppressions is greater than a predefined constant. Maybe just ignore the rest?


http://llvm-reviews.chandlerc.com/D1808



More information about the llvm-commits mailing list