From: Kirill Stoimenov Date: Mon, 20 Mar 2023 15:41:05 +0000 (+0000) Subject: Reland "[LSAN][HWASAN] Turn on leak sanitizer in HWASAN for Linux" X-Git-Tag: upstream/17.0.6~14270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b33437c969f3bc45576fda4bf43872aea8f7e8c6;p=platform%2Fupstream%2Fllvm.git Reland "[LSAN][HWASAN] Turn on leak sanitizer in HWASAN for Linux" This reverts commit 35c05f04e547100d03b6359d1f66950ff83350e0. --- diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp index 662cfb4..0a5999c 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