From 8f0a62ab3fb1e9c78269f865313f82c353460f88 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 24 Sep 2019 18:28:39 -0700 Subject: [PATCH] Detect leaks on host by default. Right now, leaks are disabled globally on host. This is problematic because: a). people write leaks in new code b). if we fix leaks in old code, it doesn't get tested c). fixing leaks in old code is harder because when we set ASAN_OPTIONS="" locally, other targets start hitting errors, and we have to set __asan_default_options there Fixes: 141313466 Test: host ASAN build passes Change-Id: I89298c7518c016e6a30884c75d7b791db16a5217 --- envsetup.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/envsetup.sh b/envsetup.sh index 92dad9a51..97d9c24c7 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -33,9 +33,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y - refreshmod: Refresh list of modules for allmod/gomod. Environment options: -- SANITIZE_HOST: Set to 'true' to use ASAN for all host modules. Note that - ASAN_OPTIONS=detect_leaks=0 will be set by default until the - build is leak-check clean. +- SANITIZE_HOST: Set to 'true' to use ASAN for all host modules. - ANDROID_QUIET_BUILD: set to 'true' to display only the essential messages. Look at the source to view more functions. The complete list is: @@ -333,7 +331,6 @@ function set_stuff_for_environment() export ANDROID_BUILD_TOP=$(gettop) # With this environment variable new GCC can apply colors to warnings/errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - export ASAN_OPTIONS=detect_leaks=0 } function set_sequence_number()