diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-04-13 20:14:15 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-04-13 20:14:15 +0000 |
commit | 2d4035c4d492b18a4c7512bc2fea8d904628ec98 (patch) | |
tree | 3be9fd3076b5a863a03c37286278d16bb183a4cb /lib/lsan | |
parent | d4919012c575113890440032263361607debc2ce (diff) |
Disable use of tls scanning on darwin leak sanitizer
Summary:
These checks appear linux-specific, disable them on darwin, at
least for now.
Reviewers: kubamracek, alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32013
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan')
-rw-r--r-- | lib/lsan/lsan_common_mac.cc | 7 | ||||
-rw-r--r-- | lib/lsan/lsan_flags.inc | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/lsan/lsan_common_mac.cc b/lib/lsan/lsan_common_mac.cc index d15551072..022e73937 100644 --- a/lib/lsan/lsan_common_mac.cc +++ b/lib/lsan/lsan_common_mac.cc @@ -87,7 +87,12 @@ AllocatorCache *GetAllocatorCache() { return &get_tls_val(true)->cache; } // Required on Linux for initialization of TLS behavior, but should not be // required on Darwin. -void InitializePlatformSpecificModules() {} +void InitializePlatformSpecificModules() { + if (flags()->use_tls) { + Report("use_tls=1 is not supported on Darwin.\n"); + Die(); + } +} // Scans global variables for heap pointers. void ProcessGlobalRegions(Frontier *frontier) { diff --git a/lib/lsan/lsan_flags.inc b/lib/lsan/lsan_flags.inc index e390e2ae5..8135bdcff 100644 --- a/lib/lsan/lsan_flags.inc +++ b/lib/lsan/lsan_flags.inc @@ -30,7 +30,7 @@ LSAN_FLAG(bool, use_globals, true, "Root set: include global variables (.data and .bss)") LSAN_FLAG(bool, use_stacks, true, "Root set: include thread stacks") LSAN_FLAG(bool, use_registers, true, "Root set: include thread registers") -LSAN_FLAG(bool, use_tls, true, +LSAN_FLAG(bool, use_tls, !SANITIZER_MAC, "Root set: include TLS and thread-specific storage") LSAN_FLAG(bool, use_root_regions, true, "Root set: include regions added via __lsan_register_root_region().") |