Merge pull request #87842 from bruvzg/sigtrap

[macOS] Add SIGTRAP to the crash handler.
This commit is contained in:
Rémi Verschelde 2024-02-07 10:59:42 +01:00
commit bf8814ed10
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,7 @@ static void handle_crash(int sig) {
signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL);
signal(SIGTRAP, SIG_DFL);
if (OS::get_singleton() == nullptr) {
abort();
@ -193,6 +194,7 @@ void CrashHandler::disable() {
signal(SIGSEGV, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGILL, SIG_DFL);
signal(SIGTRAP, SIG_DFL);
#endif
disabled = true;
@ -203,5 +205,6 @@ void CrashHandler::initialize() {
signal(SIGSEGV, handle_crash);
signal(SIGFPE, handle_crash);
signal(SIGILL, handle_crash);
signal(SIGTRAP, handle_crash);
#endif
}