about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtools')
-rw-r--r--src/libtools/signals.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index dd98e4c6..db4a5709 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -1401,10 +1401,6 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
         signal_jmpbuf_active = 0;
         longjmp(SIG_JMPBUF, 1);
     }
-    if((sig==SIGSEGV || sig==SIGBUS) && box64_quit) {
-        printf_log(LOG_INFO, "Sigfault/Segbus while quitting, exiting silently\n");
-        _exit(box64_exit_code);    // Hack, segfault while quiting, exit silently
-    }
     ucontext_t *p = (ucontext_t *)ucntx;
     void* addr = (void*)info->si_addr;  // address that triggered the issue
     void* rsp = NULL;
@@ -1614,6 +1610,10 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for
 #else
     void* db = NULL;
 #endif
+    if((sig==SIGSEGV || sig==SIGBUS) && box64_quit) {
+        printf_log(LOG_INFO, "Sigfault/Segbus while quitting, exiting silently\n");
+        _exit(box64_exit_code);    // Hack, segfault while quiting, exit silently
+    }
     static int old_code = -1;
     static void* old_pc = 0;
     static void* old_addr = 0;