[compiler-rt] 7b7db78 - [HWASAN][LSAN] Only initialize Symbolizer if leak checking is enabled
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 13:39:11 PST 2023
Author: Kirill Stoimenov
Date: 2023-02-23T21:38:59Z
New Revision: 7b7db789ff3d8750d1098dcc84aa29d11877d610
URL: https://github.com/llvm/llvm-project/commit/7b7db789ff3d8750d1098dcc84aa29d11877d610
DIFF: https://github.com/llvm/llvm-project/commit/7b7db789ff3d8750d1098dcc84aa29d11877d610.diff
LOG: [HWASAN][LSAN] Only initialize Symbolizer if leak checking is enabled
Reviewed By: hctim
Differential Revision: https://reviews.llvm.org/D144669
Added:
Modified:
compiler-rt/lib/hwasan/hwasan.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp
index b7a95cad99d38..662cfb4e9f807 100644
--- a/compiler-rt/lib/hwasan/hwasan.cpp
+++ b/compiler-rt/lib/hwasan/hwasan.cpp
@@ -400,11 +400,9 @@ __attribute__((constructor(0))) void __hwasan_init() {
__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");
More information about the llvm-commits
mailing list