diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp --- a/compiler-rt/lib/hwasan/hwasan.cpp +++ b/compiler-rt/lib/hwasan/hwasan.cpp @@ -400,11 +400,9 @@ __ubsan::InitAsPlugin(); #endif - if (CAN_SANITIZE_LEAKS) { + if (CAN_SANITIZE_LEAKS && common_flags()->detect_leaks) { __lsan::ScopedInterceptorDisabler disabler; Symbolizer::LateInitialize(); - } else { - Symbolizer::LateInitialize(); } VPrintf(1, "HWAddressSanitizer init done\n");