summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-10-17 13:18:21 +0000
committerKostya Serebryany <kcc@google.com>2013-10-17 13:18:21 +0000
commit8e2881d0c2f5525de1f6c6e025884a7ff7ac915b (patch)
treeea78f08b0e1b5a1703efd940dc468e38a36e5e0e
parent1c19a0f4a85e540b64e210fd8143a9f784f17b85 (diff)
downloadbcm5719-llvm-8e2881d0c2f5525de1f6c6e025884a7ff7ac915b.tar.gz
bcm5719-llvm-8e2881d0c2f5525de1f6c6e025884a7ff7ac915b.zip
[asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1
llvm-svn: 192892
-rw-r--r--compiler-rt/lib/asan/asan_rtl.cc2
-rw-r--r--compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_rtl.cc b/compiler-rt/lib/asan/asan_rtl.cc
index 1c207f16de4..ce7278f027a 100644
--- a/compiler-rt/lib/asan/asan_rtl.cc
+++ b/compiler-rt/lib/asan/asan_rtl.cc
@@ -533,9 +533,9 @@ void __asan_init() {
Die();
}
+ AsanTSDInit(PlatformTSDDtor);
InstallSignalHandlers();
- AsanTSDInit(PlatformTSDDtor);
// Allocator should be initialized before starting external symbolizer, as
// fork() on Mac locks the allocator.
InitializeAllocator();
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc b/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc
index d231bb57177..e24704b9019 100644
--- a/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc
+++ b/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc
@@ -2,6 +2,8 @@
// export ASAN_OPTIONS=detect_stack_use_after_return=1
// RUN: %clangxx_asan -O2 %s -o %t && \
// RUN: %t 2>&1 | FileCheck %s
+// Also check that use_sigaltstack+verbosity doesn't crash.
+// RUN: ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 %t | FileCheck %s
#include <stdio.h>
__attribute__((noinline))
OpenPOWER on IntegriCloud