Skip to content

Commit

Permalink
[HWASAN][LSAN] Only initialize Symbolizer if leak checking is enabled
Browse files Browse the repository at this point in the history
Reviewed By: hctim

Differential Revision: https://reviews.llvm.org/D144669
  • Loading branch information
kstoimenov committed Feb 23, 2023
1 parent bb58851 commit 7b7db78
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler-rt/lib/hwasan/hwasan.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 7b7db78

Please sign in to comment.