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:
commit
cac3f44f6e
2 changed files with 8 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue