File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,13 @@ function(cpp_cc_enable_sanitizers)
133133 list (APPEND compiler_flags -fsanitize=address -fsanitize-address-use-after-scope)
134134 # Figure out where the runtime library lives
135135 cpp_cc_find_sanitizer_runtime(NAME asan OUTPUT runtime_library)
136+ if (APPLE )
137+ # Suppress and annoying "malloc: nano zone abandoned due to inability to preallocate reserved
138+ # vm space" message. See https://stackoverflow.com/a/70209891
139+ list (APPEND extra_env MallocNanoZone=0)
140+ endif ()
136141 if (LLVM_SYMBOLIZER_PATH)
137- set ( extra_env "ASAN_SYMBOLIZER_PATH=${LLVM_SYMBOLIZER_PATH} " )
142+ list ( APPEND extra_env "ASAN_SYMBOLIZER_PATH=${LLVM_SYMBOLIZER_PATH} " )
138143 if ("leak" IN_LIST sanitizers)
139144 list (APPEND extra_env "LSAN_SYMBOLIZER_PATH=${LLVM_SYMBOLIZER_PATH} " )
140145 endif ()
You can’t perform that action at this time.
0 commit comments