Handle SIGBUS. Or at least try it.

I was reported a strange problem were GL3 is crashing with SIGBUS while
enumerating the GL extensions. To me it looks like a problem in Nvidias
FreeBSD driver, which for some reason doesn't reproduce on my machine.
However it' hard to tell what exactly happens without a full backtrace
and the user is unable to provide one... For the future try to handle
SIGBUS to catch those problems.
This commit is contained in:
Yamagi 2022-11-14 21:37:47 +01:00
parent 57db0df752
commit 8b12b017f7

View file

@ -109,6 +109,7 @@ signalhandler(int sig)
signal(SIGILL, SIG_DFL);
signal(SIGFPE, SIG_DFL);
signal(SIGABRT, SIG_DFL);
signal(SIGBUS, SIG_DFL);
/* pass signal to the os */
raise(sig);
@ -130,6 +131,7 @@ registerHandler(void)
signal(SIGILL, signalhandler);
signal(SIGFPE, signalhandler);
signal(SIGABRT, signalhandler);
signal(SIGBUS, signalhandler);
/* User abort */
signal(SIGINT, terminate);