Skip to content

Commit c1a4456

Browse files
Reland "[lldb][lit] Add MallocNanoZone envvar to Darwin ASan builds" … (llvm#88442)
…(llvm#88436)" This reverts commit 1f5d130. The original commit checks that the host system is "Darwin" before setting the `MallocNanoZone` envvar, but on the Shell lit config this attribute does not exist at the point where it is being checked which leads to a build failure. This commit checks the host OS correctly.
1 parent 9f14914 commit c1a4456

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lldb/test/API/lit.cfg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ def delete_module_cache(path):
121121
config.environment["DYLD_INSERT_LIBRARIES"] = find_sanitizer_runtime(
122122
"libclang_rt.asan_osx_dynamic.dylib"
123123
)
124+
config.environment["MallocNanoZone"] = "0"
124125

125126
if "Thread" in config.llvm_use_sanitizer:
126127
config.environment["TSAN_OPTIONS"] = "halt_on_error=1"

lldb/test/Shell/lit.cfg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
# Enable sanitizer runtime flags.
5353
config.environment["ASAN_OPTIONS"] = "detect_stack_use_after_return=1"
5454
config.environment["TSAN_OPTIONS"] = "halt_on_error=1"
55+
if platform.system() == "Darwin":
56+
config.environment["MallocNanoZone"] = "0"
5557

5658
# Support running the test suite under the lldb-repro wrapper. This makes it
5759
# possible to capture a test suite run and then rerun all the test from the

0 commit comments

Comments
 (0)