Merge pull request #22415 from ibrahn/fix-late-segfault-hang

Fixed hang when segfaulting after OS object destroyed (OSX and X11)
This commit is contained in:
Rémi Verschelde 2018-09-25 08:33:28 +02:00 committed by GitHub
commit cac3f44f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -68,8 +68,9 @@ static uint64_t load_address() {
}
static void handle_crash(int sig) {
if (OS::get_singleton() == NULL)
return;
if (OS::get_singleton() == NULL) {
abort();
}
void *bt_buffer[256];
size_t size = backtrace(bt_buffer, 256);
@ -151,6 +152,7 @@ CrashHandler::CrashHandler() {
}
CrashHandler::~CrashHandler() {
disable();
}
void CrashHandler::disable() {

View File

@ -45,8 +45,9 @@
#include <stdlib.h>
static void handle_crash(int sig) {
if (OS::get_singleton() == NULL)
return;
if (OS::get_singleton() == NULL) {
abort();
}
void *bt_buffer[256];
size_t size = backtrace(bt_buffer, 256);
@ -119,6 +120,7 @@ CrashHandler::CrashHandler() {
}
CrashHandler::~CrashHandler() {
disable();
}
void CrashHandler::disable() {