summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_flags.inc
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@partner.samsung.com>2017-01-23 08:45:17 +0000
committerMaxim Ostapenko <m.ostapenko@partner.samsung.com>2017-01-23 08:45:17 +0000
commit10dcf594d9bd253f3770a893587bd9a7359dbdc4 (patch)
tree00946a162be06097e970b0f416ac5fccca714640 /lib/sanitizer_common/sanitizer_flags.inc
parent2bd83302420b6c943f0e2b9e4fb769e2a59c8193 (diff)
downloadcompiler-rt-10dcf594d9bd253f3770a893587bd9a7359dbdc4.tar.gz
[lsan] Enable LSan for x86 Linux.
People keep asking LSan to be available on 32 bit targets (e.g. https://github.com/google/sanitizers/issues/403) despite the fact that false negative ratio might be huge (up to 85%). This happens for big real world applications that may contain random binary data (e.g. browser), but for smaller apps situation is not so terrible and LSan still might be useful. This patch adds initial support for x86 Linux (disabled by default), ARM32 is in TODO list. We used this patch (well, ported to GCC) on our 32 bit mobile emulators and it worked pretty fine thus I'm posting it here to initiate further discussion. Differential Revision: https://reviews.llvm.org/D28609 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.inc')
-rw-r--r--lib/sanitizer_common/sanitizer_flags.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.inc b/lib/sanitizer_common/sanitizer_flags.inc
index d7fa34a58..d799f6ef7 100644
--- a/lib/sanitizer_common/sanitizer_flags.inc
+++ b/lib/sanitizer_common/sanitizer_flags.inc
@@ -62,7 +62,8 @@ COMMON_FLAG(
COMMON_FLAG(
int, verbosity, 0,
"Verbosity level (0 - silent, 1 - a bit of output, 2+ - more output).")
-COMMON_FLAG(bool, detect_leaks, true, "Enable memory leak detection.")
+COMMON_FLAG(bool, detect_leaks, SANITIZER_WORDSIZE == 64,
+ "Enable memory leak detection.")
COMMON_FLAG(
bool, leak_check_at_exit, true,
"Invoke leak checking in an atexit handler. Has no effect if "