[compiler-rt] r192892 - [asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1

Kostya Serebryany kcc at google.com
Thu Oct 17 06:18:21 PDT 2013


Author: kcc
Date: Thu Oct 17 08:18:21 2013
New Revision: 192892

URL: http://llvm.org/viewvc/llvm-project?rev=192892&view=rev
Log:
[asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1

Modified:
    compiler-rt/trunk/lib/asan/asan_rtl.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_call_stack.cc

Modified: compiler-rt/trunk/lib/asan/asan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_rtl.cc?rev=192892&r1=192891&r2=192892&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc Thu Oct 17 08:18:21 2013
@@ -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();

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_call_stack.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_call_stack.cc?rev=192892&r1=192891&r2=192892&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_call_stack.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/deep_call_stack.cc Thu Oct 17 08:18:21 2013
@@ -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))





More information about the llvm-commits mailing list