[llvm] r314535 - [test] Enable LeakSanitizer on 64-bit Darwin ASan llvm builds
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 09:51:50 PDT 2017
Author: fjricci
Date: Fri Sep 29 09:51:50 2017
New Revision: 314535
URL: http://llvm.org/viewvc/llvm-project?rev=314535&view=rev
Log:
[test] Enable LeakSanitizer on 64-bit Darwin ASan llvm builds
Summary:
Also disables leak checking on lto tests, due to many leaks reported
in the system's ld64.
Reviewers: kcc, pcc, bogner, kubamracek
Subscribers: mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D37781
Modified:
llvm/trunk/test/tools/lto/lit.local.cfg
llvm/trunk/utils/lit/lit/llvm/config.py
Modified: llvm/trunk/test/tools/lto/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/lto/lit.local.cfg?rev=314535&r1=314534&r2=314535&view=diff
==============================================================================
--- llvm/trunk/test/tools/lto/lit.local.cfg (original)
+++ llvm/trunk/test/tools/lto/lit.local.cfg Fri Sep 29 09:51:50 2017
@@ -1,2 +1,6 @@
if not ('ld64_plugin' in config.available_features and 'X86' in config.root.targets):
- config.unsupported = True
+ config.unsupported = True
+
+# These tests invoke ld64 from the system, which is not leak-free
+if "Address" in config.llvm_use_sanitizer:
+ config.environment['ASAN_OPTIONS'] = 'detect_leaks=0'
Modified: llvm/trunk/utils/lit/lit/llvm/config.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=314535&r1=314534&r2=314535&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py (original)
+++ llvm/trunk/utils/lit/lit/llvm/config.py Fri Sep 29 09:51:50 2017
@@ -75,6 +75,9 @@ class LLVMConfig(object):
features.add("long_tests")
if target_triple:
+ if re.match(r'^x86_64.*-apple', target_triple):
+ if 'address' in sanitizers:
+ self.with_environment('ASAN_OPTIONS', 'detect_leaks=1', append_path=True)
if re.match(r'^x86_64.*-linux', target_triple):
features.add("x86_64-linux")
if re.match(r'.*-win32$', target_triple):
More information about the llvm-commits
mailing list