summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/tests/unit
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-12 08:29:42 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-12 08:29:42 +0000
commit7304b4201f7f5b64cb44c540d98182cea1f630da (patch)
treeaebab3e230b7ceb6e7bc88db4a435ef782e8dca3 /compiler-rt/lib/tsan/tests/unit
parentc34a997669646c0f87f6eb63a57173f4e2e2ac71 (diff)
downloadbcm5719-llvm-7304b4201f7f5b64cb44c540d98182cea1f630da.tar.gz
bcm5719-llvm-7304b4201f7f5b64cb44c540d98182cea1f630da.zip
[Sanitizer] Teach external symbolizer to work with addr2line if llvm-symbolizer is unavailable. Allow this mode in TSan.
llvm-svn: 201218
Diffstat (limited to 'compiler-rt/lib/tsan/tests/unit')
-rw-r--r--compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc b/compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc
index c90df413243..36e3a49bfd4 100644
--- a/compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc
+++ b/compiler-rt/lib/tsan/tests/unit/tsan_flags_test.cc
@@ -63,6 +63,7 @@ static const char *options1 =
" symbolize=0"
" external_symbolizer_path=asdfgh"
+ " allow_addr2line=true"
" strip_path_prefix=zxcvb"
" fast_unwind_on_fatal=0"
" fast_unwind_on_malloc=0"
@@ -105,6 +106,7 @@ static const char *options2 =
" symbolize=true"
" external_symbolizer_path=cccccc"
+ " allow_addr2line=false"
" strip_path_prefix=ddddddd"
" fast_unwind_on_fatal=true"
" fast_unwind_on_malloc=true"
@@ -146,7 +148,8 @@ void VerifyOptions1(Flags *f) {
EXPECT_EQ(f->die_after_fork, true);
EXPECT_EQ(f->symbolize, 0);
- EXPECT_EQ(f->external_symbolizer_path, std::string(""));
+ EXPECT_EQ(f->external_symbolizer_path, std::string("asdfgh"));
+ EXPECT_EQ(f->allow_addr2line, true);
EXPECT_EQ(f->strip_path_prefix, std::string("zxcvb"));
EXPECT_EQ(f->fast_unwind_on_fatal, 0);
EXPECT_EQ(f->fast_unwind_on_malloc, 0);
@@ -189,6 +192,7 @@ void VerifyOptions2(Flags *f) {
EXPECT_EQ(f->symbolize, true);
EXPECT_EQ(f->external_symbolizer_path, std::string("cccccc"));
+ EXPECT_EQ(f->allow_addr2line, false);
EXPECT_EQ(f->strip_path_prefix, std::string("ddddddd"));
EXPECT_EQ(f->fast_unwind_on_fatal, true);
EXPECT_EQ(f->fast_unwind_on_malloc, true);
OpenPOWER on IntegriCloud