[asan] fix a failure with ASAN_OPTIONS=verbosity=1:use_sigaltstack=1

llvm-svn: 192892
This commit is contained in:
Kostya Serebryany 2013-10-17 13:18:21 +00:00
parent 1c19a0f4a8
commit 8e2881d0c2
2 changed files with 3 additions and 1 deletions

View File

@ -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();

View File

@ -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))