diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-12-17 11:15:39 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-12-17 11:15:39 +0000 |
commit | 25d010a98d7b9396e7dbd0cee957233fb6290234 (patch) | |
tree | 4170d0dd58fe5fcba4fcfa06a23a97d7d9ca501b /compiler-rt/lib/lsan | |
parent | 5828d7b93606087875c61ed2fdb816e03c2a18ce (diff) | |
download | bcm5719-llvm-25d010a98d7b9396e7dbd0cee957233fb6290234.tar.gz bcm5719-llvm-25d010a98d7b9396e7dbd0cee957233fb6290234.zip |
[Sanitizer] Always initialize a Symbolizer (even if 'symbolize' is false).
If 'symbolize' flag is not set, we still want to transform virtual address
to module+offset pair in the call to Symbolizer::SymbolizeCode().
See https://code.google.com/p/address-sanitizer/issues/detail?id=251 for
more details.
llvm-svn: 197491
Diffstat (limited to 'compiler-rt/lib/lsan')
-rw-r--r-- | compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc | 9 | ||||
-rw-r--r-- | compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc.supp | 1 | ||||
-rw-r--r-- | compiler-rt/lib/lsan/lsan.cc | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc b/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc index 59dab898173..bc8913a6c37 100644 --- a/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc +++ b/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc @@ -1,6 +1,11 @@ -// RUN: LSAN_BASE="use_registers=0:use_stacks=0:suppressions=%s.supp" +// RUN: LSAN_BASE="use_registers=0:use_stacks=0" // RUN: %clangxx_lsan %s -o %t -// RUN: LSAN_OPTIONS=$LSAN_BASE not %t 2>&1 | FileCheck %s + +// RUN: echo "leak:*LSanTestLeakingFunc*" > %t.supp1 +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions=%t.supp1 not %t 2>&1 | FileCheck %s + +// RUN: echo "leak:%t" > %t.supp2 +// RUN: LSAN_OPTIONS=$LSAN_BASE:suppressions="%t.supp2":symbolize=false %t #include <stdio.h> #include <stdlib.h> diff --git a/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc.supp b/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc.supp deleted file mode 100644 index 8d8e560cba4..00000000000 --- a/compiler-rt/lib/lsan/lit_tests/TestCases/suppressions_file.cc.supp +++ /dev/null @@ -1 +0,0 @@ -leak:*LSanTestLeakingFunc* diff --git a/compiler-rt/lib/lsan/lsan.cc b/compiler-rt/lib/lsan/lsan.cc index 203590eb77c..1b30b4f74c7 100644 --- a/compiler-rt/lib/lsan/lsan.cc +++ b/compiler-rt/lib/lsan/lsan.cc @@ -60,12 +60,7 @@ extern "C" void __lsan_init() { ThreadStart(tid, GetTid()); SetCurrentThread(tid); - // Start symbolizer process if necessary. - if (common_flags()->symbolize) { - Symbolizer::Init(common_flags()->external_symbolizer_path); - } else { - Symbolizer::Disable(); - } + Symbolizer::Init(common_flags()->external_symbolizer_path); InitCommonLsan(); if (common_flags()->detect_leaks && common_flags()->leak_check_at_exit) |