CrashRecovery/Darwin: Override raise() as well so that crash recovery doesn't

end up altering the thread on which crashes are done because of its use of
Darwin's broken raise() implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-09-22 17:46:10 +00:00
parent 1963572f9d
commit e4e06a86bc

View File

@ -274,6 +274,10 @@ void llvm::sys::PrintStackTraceOnErrorSignal() {
#ifdef __APPLE__
int raise(int sig) {
return pthread_kill(pthread_self(), SIGABRT);
}
void __assert_rtn(const char *func,
const char *file,
int line,
@ -291,7 +295,7 @@ void __assert_rtn(const char *func,
#include <pthread.h>
void abort() {
pthread_kill(pthread_self(), SIGABRT);
raise(SIGABRT);
usleep(1000);
__builtin_trap();
}