[compiler-rt] 6c75648 - [LSAN][HWASAN] Turn on leak sanitizer in HWASAN for Linux
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 22:48:34 PDT 2023
Author: Kirill Stoimenov
Date: 2023-03-16T05:48:25Z
New Revision: 6c756486d44914bac6fb20513b8c41f1a5726c4c
URL: https://github.com/llvm/llvm-project/commit/6c756486d44914bac6fb20513b8c41f1a5726c4c
DIFF: https://github.com/llvm/llvm-project/commit/6c756486d44914bac6fb20513b8c41f1a5726c4c.diff
LOG: [LSAN][HWASAN] Turn on leak sanitizer in HWASAN for Linux
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D146098
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 662cfb4e9f807..0a5999cf7f2a5 100644
--- a/compiler-rt/lib/hwasan/hwasan.cpp
+++ b/compiler-rt/lib/hwasan/hwasan.cpp
@@ -86,8 +86,9 @@ static void InitializeFlags() {
cf.clear_shadow_mmap_threshold = 4096 * (SANITIZER_ANDROID ? 2 : 8);
// Sigtrap is used in error reporting.
cf.handle_sigtrap = kHandleSignalExclusive;
- // FIXME: enable once all false positives have been fixed.
- cf.detect_leaks = false;
+ // For now only tested on Linux. Other plantforms can be turned on as they
+ // become ready.
+ cf.detect_leaks = cf.detect_leaks && SANITIZER_LINUX && !SANITIZER_ANDROID;
#if SANITIZER_ANDROID
// Let platform handle other signals. It is better at reporting them then we
More information about the llvm-commits
mailing list