From 5232b099a29cc5db81953e1264fc8f5d880e93b6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 27 Apr 2014 07:50:41 -0600 Subject: [PATCH] revise error printed for kernel-/debugger-sent SIGSEGVs --- racket/src/racket/gc2/sighand.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/racket/src/racket/gc2/sighand.c b/racket/src/racket/gc2/sighand.c index 64ad1d8487..f93f5a066d 100644 --- a/racket/src/racket/gc2/sighand.c +++ b/racket/src/racket/gc2/sighand.c @@ -82,7 +82,7 @@ void fault_handler(int sn, siginfo_t *si, void *ctx) /* supposedly its coming from the user via kill */ /* so just ignore it. It appears when */ /* running w/ places in GDB */ - printf("SIGSEGV SI_USER SI_CODE %i fault on addr %p\n", c, p); + printf("SIGSEGV SI_USER SI_ERRNO %i fault on addr %p\n", si->si_errno, p); #ifdef MZ_USE_PLACES printf("pid %i uid %i thread %lx\n", si->si_pid, si->si_uid, mz_proc_thread_self()); #else @@ -90,8 +90,8 @@ void fault_handler(int sn, siginfo_t *si, void *ctx) #endif return; } - if (c == 128 ) { - printf("SIGSEGV SI_KERNEL SI_CODE %i fault on addr %p sent by kernel\n", c, p); + if (c == 128) { + printf("SIGSEGV SI_KERNEL SI_ERRNO %i fault on addr %p\n", si->si_errno, p); } #if WAIT_FOR_GDB launchgdb();