Index: test/Modules/crash-vfs-ivfsoverlay.m =================================================================== --- test/Modules/crash-vfs-ivfsoverlay.m +++ test/Modules/crash-vfs-ivfsoverlay.m @@ -7,6 +7,7 @@ // RUN: %S/../VFS/Inputs/vfsoverlay2.yaml > %t/srcvfs.yaml // RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \ +// RUN: ASAN_OPTIONS=detect_leaks=0 \ // RUN: %clang -fsyntax-only -nostdinc %s \ // RUN: -I %S/Inputs/crash-recovery/usr/include \ // RUN: -ivfsoverlay %t/srcvfs.yaml \ Index: test/lit.cfg =================================================================== --- test/lit.cfg +++ test/lit.cfg @@ -407,6 +407,9 @@ # Sanitizers. if 'Address' in config.llvm_use_sanitizer: config.available_features.add("asan") + # LeakSanitizer is disabled by default on Darwin, enable it + if re.match(r'^x86_64-apple.*', config.target_triple): + config.environment['ASAN_OPTIONS'] = 'detect_leaks=1' else: config.available_features.add("not_asan") if 'Memory' in config.llvm_use_sanitizer: