mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-13 15:37:24 +00:00
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:
parent
1963572f9d
commit
e4e06a86bc
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user