[PATCH] tsan: ignore interceptors coming from specified libraries
Alexey Samsonov
samsonov at google.com
Thu Oct 3 04:46:06 PDT 2013
================
Comment at: sanitizer_common/sanitizer_libignore.cc:46
@@ +45,3 @@
+ uptr b, e, off, prot;
+ while (proc_maps.Next(&b, &e, &off, &fn[0], fn.size(), &prot)) {
+ if ((prot & MemoryMappingLayout::kProtectionExecute) != 0
----------------
s/&fn[0]/fn.data() (here and below)
================
Comment at: sanitizer_common/sanitizer_libignore.cc:53
@@ +52,3 @@
+ SanitizerToolName, lib->templ, lib->name, &fn[0]);
+ CHECK(0);
+ }
----------------
You may use UNREACHABLE macro here and below
================
Comment at: sanitizer_common/sanitizer_libignore.cc:39
@@ +38,3 @@
+ BlockingMutexLock lock(&mutex_);
+ bool loaded[kMaxLibs] = {};
+ MemoryMappingLayout proc_maps(/*cache_enabled*/false);
----------------
You don't need this array - at i-th iteration you use only loaded[i];
================
Comment at: tsan/lit_tests/ignore_lib0.cc:4
@@ +3,3 @@
+// RUN: echo running w/o suppressions:
+// RUN: LD_LIBRARY_PATH=./Output/ not %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOSUPP
+// RUN: echo running with suppressions:
----------------
Why do you need this LD_LIBRARY_PATH and Output here?
http://llvm-reviews.chandlerc.com/D1808
More information about the llvm-commits
mailing list