Date: Tue, 11 Jul 2006 21:02:45 +0200 (MEST) From: Michiel Boland <michiel@boland.org> To: freebsd-current@freebsd.org Subject: kdump crashes on illegal signal argument to sigaction Message-ID: <Pine.GSO.4.64.0607112102220.16049@brakkenstein.nijmegen.internl.net>
next in thread | raw e-mail | index | archive | help
Hi. Consider the following #include <signal.h> int main(void) { sigaction(33, 0, 0); return 0; } If you compile the above, and then do ktrace -tnc ./a.out kdump kdump crashes in signame() because signames[33] points to garbage. A fix would be something like this:- --- mksubr.orig Sat May 20 16:27:22 2006 +++ mksubr Tue Jul 11 20:57:29 2006 @@ -151,7 +151,10 @@ void signame (int sig) { - (void)printf("SIG%s",signames[sig]); + if (sig >= 0 && sig < NSIG) + (void)printf("SIG%s",signames[sig]); + else + (void)printf("SIG %d", sig); } /* MANUAL */ Cheers Michiel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0607112102220.16049>