[compiler-rt] r300248 - Disable use of tls scanning on darwin leak sanitizer
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 13:14:15 PDT 2017
Author: fjricci
Date: Thu Apr 13 15:14:15 2017
New Revision: 300248
URL: http://llvm.org/viewvc/llvm-project?rev=300248&view=rev
Log:
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
Modified:
compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
compiler-rt/trunk/lib/lsan/lsan_flags.inc
Modified: compiler-rt/trunk/lib/lsan/lsan_common_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common_mac.cc?rev=300248&r1=300247&r2=300248&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common_mac.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common_mac.cc Thu Apr 13 15:14:15 2017
@@ -87,7 +87,12 @@ AllocatorCache *GetAllocatorCache() { re
// 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) {
Modified: compiler-rt/trunk/lib/lsan/lsan_flags.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_flags.inc?rev=300248&r1=300247&r2=300248&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_flags.inc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_flags.inc Thu Apr 13 15:14:15 2017
@@ -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().")
More information about the llvm-commits
mailing list