From: William Lallemand Date: Thu, 7 Jun 2018 07:49:04 +0000 (+0200) Subject: BUG/MINOR: don't ignore SIG{BUS,FPE,ILL,SEGV} during signal processing X-Git-Tag: v1.9-dev1~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=933642c6ef7c3015222cba84c20f13a1ca0eafd6;p=thirdparty%2Fhaproxy.git BUG/MINOR: don't ignore SIG{BUS,FPE,ILL,SEGV} during signal processing We don't have any reason of blocking those signals. If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are generated while they are blocked, the result is undefined, unless the signal was generated by kill(2), sigqueue(3), or raise(3). This should be backported to 1.8. --- diff --git a/src/signal.c b/src/signal.c index f1f6821883..0dadd762c1 100644 --- a/src/signal.c +++ b/src/signal.c @@ -120,6 +120,14 @@ int signal_init() sigfillset(&blocked_sig); sigdelset(&blocked_sig, SIGPROF); + /* man sigprocmask: If SIGBUS, SIGFPE, SIGILL, or SIGSEGV are + generated while they are blocked, the result is undefined, unless + the signal was generated by kill(2), + sigqueue(3), or raise(3) */ + sigdelset(&blocked_sig, SIGBUS); + sigdelset(&blocked_sig, SIGFPE); + sigdelset(&blocked_sig, SIGILL); + sigdelset(&blocked_sig, SIGSEGV); for (sig = 0; sig < MAX_SIGNAL; sig++) LIST_INIT(&signal_state[sig].handlers);