diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-18 23:39:47 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-08-18 23:39:47 +0000 |
commit | ee354fb8b0da2f6d814c2944dec1cac22b45c175 (patch) | |
tree | 1713a97d51c468592702a64e56a2a7a6d41d4a52 /lib/lsan/lsan.cc | |
parent | 2a0bb212bbe96125fc0a4f9e5859949ba7360fd9 (diff) |
[LSan] Parse common flags from LSAN_OPTIONS even if LSan is combined with
another sanitizer.
A user may run both LSan and LSan+ASan. It is weird to pass path to leak
suppression file (or other common sanitizer flags, like "verbosity") in
"LSAN_OPTIONS" in the first case and in "ASAN_OPTIONS" in the second case.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan.cc')
-rw-r--r-- | lib/lsan/lsan.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/lsan/lsan.cc b/lib/lsan/lsan.cc index 25389f62a..02b5ac1a9 100644 --- a/lib/lsan/lsan.cc +++ b/lib/lsan/lsan.cc @@ -25,16 +25,6 @@ bool lsan_init_is_running; namespace __lsan { -static void InitializeCommonFlags() { - CommonFlags *cf = common_flags(); - SetCommonFlagsDefaults(cf); - cf->external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH"); - cf->malloc_context_size = 30; - cf->detect_leaks = true; - - ParseCommonFlagsFromString(cf, GetEnv("LSAN_OPTIONS")); -} - ///// Interface to the common LSan module. ///// bool WordIsPoisoned(uptr addr) { return false; @@ -50,7 +40,7 @@ extern "C" void __lsan_init() { return; lsan_init_is_running = true; SanitizerToolName = "LeakSanitizer"; - InitializeCommonFlags(); + InitCommonLsan(true); InitializeAllocator(); InitTlsSize(); InitializeInterceptors(); @@ -62,7 +52,6 @@ extern "C" void __lsan_init() { Symbolizer::GetOrInit(); - InitCommonLsan(); if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) Atexit(DoLeakCheck); lsan_inited = true; |