diff --git a/compiler-rt/lib/asan/asan_malloc_mac.cc b/compiler-rt/lib/asan/asan_malloc_mac.cc index 16e92017ce945603cb18b84b3c7543aa6255e0ad..1626ebebbcbbe7035af0c8e3f46cbde8723cd293 100644 --- a/compiler-rt/lib/asan/asan_malloc_mac.cc +++ b/compiler-rt/lib/asan/asan_malloc_mac.cc @@ -98,7 +98,7 @@ INTERCEPTOR(void, __CFInitialize) { CHECK(FLAG_replace_cfallocator); CHECK(asan_inited); REAL(__CFInitialize)(); - ReplaceCFAllocator(); + if (!cf_asan) ReplaceCFAllocator(); } namespace {