Skip to content

Commit 1fccc83

Browse files
danliew-appledelcypher
authored andcommitted
[Compiler-rt] Fix running ASan/TSan unit tests under macOS 12.0.
On macOS the unit tests currently rely on libmalloc being used for allocations (due to no functioning interceptors) but also having the ASan/TSan allocator initialized in the same process. This leads to crashes with the macOS 12.0 libmalloc nano allocator so disable use of the allocator while running unit tests as a workaround. rdar://80086125 Differential Revision: https://reviews.llvm.org/D107412 (cherry picked from commit b4121b3)
1 parent bbab9ab commit 1fccc83

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler-rt/unittests/lit.common.unit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
# 64-bit Darwin. Using more scales badly and hogs the system due to
3535
# inefficient handling of large mmap'd regions (terabytes) by the kernel.
3636
lit_config.parallelism_groups["shadow-memory"] = 3
37+
# Disable libmalloc nanoallocator due to crashes running on macOS 12.0.
38+
#
39+
# rdar://80086125
40+
config.environment['MallocNanoZone'] = '0'
3741

3842
# The test config gets pickled and sent to multiprocessing workers, and that
3943
# only works for code if it is stored at the top level of some module.

0 commit comments

Comments
 (0)