diff options
author | Sergey Matveev <earthdok@google.com> | 2013-06-21 14:51:52 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2013-06-21 14:51:52 +0000 |
commit | 200afbd8ba4904241c1ebcef4fa79d739ca01f73 (patch) | |
tree | 99b06fc5181f2d0be028c38ea33c286ca3df07a4 /lib/lsan/lsan_common.h | |
parent | d530d892b4958a9ae54e57472d5d0a0bae1f6ad8 (diff) |
[asan] Move lsan_disabled out of thread context.
Fix for the case where disabler is used in pthread key destructor.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan_common.h')
-rw-r--r-- | lib/lsan/lsan_common.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/lsan/lsan_common.h b/lib/lsan/lsan_common.h index 18de27226..0d90acf06 100644 --- a/lib/lsan/lsan_common.h +++ b/lib/lsan/lsan_common.h @@ -75,12 +75,6 @@ struct Flags { extern Flags lsan_flags; inline Flags *flags() { return &lsan_flags; } -void InitCommonLsan(); -// Testing interface. Find leaked chunks and dump their addresses to vector. -void ReportLeaked(InternalMmapVector<void *> *leaked, uptr sources); -// Normal leak check. Find leaks and print a report according to flags. -void DoLeakCheck(); - struct Leak { uptr hit_count; uptr total_size; @@ -151,9 +145,9 @@ class MarkIndirectlyLeakedCb { }; // Finds all chunk marked as kIgnored and adds their addresses to frontier. -class CollectSuppressedCb { +class CollectIgnoredCb { public: - explicit CollectSuppressedCb(Frontier *frontier) + explicit CollectIgnoredCb(Frontier *frontier) : frontier_(frontier) {} void operator()(void *p) const; private: @@ -166,6 +160,11 @@ enum IgnoreObjectResult { kIgnoreObjectInvalid }; +// Functions called from the parent tool. +void InitCommonLsan(); +void DoLeakCheck(); +bool DisabledInThisThread(); + // The following must be implemented in the parent tool. template<typename Callable> void ForEachChunk(Callable const &callback); |