libsanitizer/
* asan/asan_flags.cc: Switch on leak detection for 64-bit target.
* lsan/lsan.cc: Likewise.
* sanitizer_common/sanitizer_flags.inc: Likewise.
Neither the OBS build nor sanitized firmware build are affected.
When Tizen application developer enables ASan for his own package only and run
it in 64-bit emulator (without any additional setup) ASan will report leaks
additionally to all other error messages.
Change-Id: Id16017e9bbe5221778330287c707bdf1846f0760
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
{
CommonFlags cf;
cf.CopyFrom(*common_flags());
- cf.detect_leaks = false;
+ cf.detect_leaks = (SANITIZER_WORDSIZE == 64);
cf.external_symbolizer_path = GetEnv("ASAN_SYMBOLIZER_PATH");
cf.malloc_context_size = kDefaultMallocContextSize;
cf.intercept_tls_get_addr = true;
cf.CopyFrom(*common_flags());
cf.external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH");
cf.malloc_context_size = 30;
- cf.detect_leaks = false;
+ cf.detect_leaks = (SANITIZER_WORDSIZE == 64);
cf.exitcode = 0;
OverrideCommonFlags(cf);
}
COMMON_FLAG(
int, verbosity, 0,
"Verbosity level (0 - silent, 1 - a bit of output, 2+ - more output).")
-COMMON_FLAG(bool, detect_leaks, false, "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 "