summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2013-10-03 13:37:17 +0000
committerDmitry Vyukov <dvyukov@google.com>2013-10-03 13:37:17 +0000
commit5ba736457c94580b9cf8a0a65fccf9a89da0b1a6 (patch)
treeafa352b57a63c0e8b42932077375b7c6310a3515 /compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h
parentd2757ba1be2915c8f41dd850ffdda8ff6a673382 (diff)
downloadbcm5719-llvm-5ba736457c94580b9cf8a0a65fccf9a89da0b1a6.tar.gz
bcm5719-llvm-5ba736457c94580b9cf8a0a65fccf9a89da0b1a6.zip
tsan: ignore interceptors coming from specified libraries
LibIgnore allows to ignore all interceptors called from a particular set of dynamic libraries. LibIgnore remembers all "called_from_lib" suppressions from the provided SuppressionContext; finds code ranges for the libraries; and checks whether the provided PC value belongs to the code ranges. Also make malloc and friends interceptors use SCOPED_INTERCEPTOR_RAW instead of SCOPED_TSAN_INTERCEPTOR, because if they are called from an ignored lib, then must call our internal allocator instead of libc malloc. llvm-svn: 191897
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h
index e0b562e5825..92cb09365b5 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_suppressions.h
@@ -25,6 +25,7 @@ enum SuppressionType {
SuppressionThread,
SuppressionSignal,
SuppressionLeak,
+ SuppressionLib,
SuppressionTypeCount
};
@@ -40,7 +41,8 @@ class SuppressionContext {
SuppressionContext() : suppressions_(1), can_parse_(true) {}
void Parse(const char *str);
bool Match(const char* str, SuppressionType type, Suppression **s);
- uptr SuppressionCount();
+ uptr SuppressionCount() const;
+ const Suppression *SuppressionAt(uptr i) const;
void GetMatched(InternalMmapVector<Suppression *> *matched);
private:
@@ -52,7 +54,6 @@ class SuppressionContext {
const char *SuppressionTypeString(SuppressionType t);
-// Exposed for testing.
bool TemplateMatch(char *templ, const char *str);
} // namespace __sanitizer
OpenPOWER on IntegriCloud