[master] bbf4942 Restore SIGSEGV and SIGABRT to SIG_DFL in child_signal_handler() to prevent recursion.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Aug 29 10:54:06 CEST 2017
commit bbf494287fd5de02f7eecd71564f142af22a0876
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Aug 29 07:45:40 2017 +0000
Restore SIGSEGV and SIGABRT to SIG_DFL in child_signal_handler()
to prevent recursion.
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 91d6c5e..3e30dda 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -263,9 +263,16 @@ static void __match_proto__()
child_signal_handler(int s, siginfo_t *si, void *c)
{
char buf[1024];
+ struct sigaction sa;
(void)c;
+ /* Don't come back */
+ memset(&sa, 0, sizeof sa);
+ sa.sa_handler = SIG_DFL;
+ (void)sigaction(SIGSEGV, &sa, NULL);
+ (void)sigaction(SIGABRT, &sa, NULL);
+
bprintf(buf, "Signal %d (%s) received at %p si_code %d",
s, strsignal(s), si->si_addr, si->si_code);
VAS_Fail(__func__,
More information about the varnish-commit
mailing list