[4.1] aa9fc51 Ignore the alternate stack if the handler is off
Federico G. Schwindt
fgsch at lodoss.net
Tue Sep 26 07:26:04 UTC 2017
commit aa9fc51c00bdfd8e12d4b385555c9e8a02fdca56
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sun Sep 24 21:56:38 2017 +0100
Ignore the alternate stack if the handler is off
diff --git a/bin/varnishd/cache/cache_main.c b/bin/varnishd/cache/cache_main.c
index d8b1684..378be3d 100644
--- a/bin/varnishd/cache/cache_main.c
+++ b/bin/varnishd/cache/cache_main.c
@@ -116,7 +116,8 @@ void
THR_Init(void)
{
#ifdef HAVE_SIGALTSTACK
- AZ(sigaltstack(&altstack, NULL));
+ if (altstack.ss_sp != NULL)
+ AZ(sigaltstack(&altstack, NULL));
#endif
}
diff --git a/bin/varnishtest/tests/c00057.vtc b/bin/varnishtest/tests/c00057.vtc
index d8008af..f199fc9 100644
--- a/bin/varnishtest/tests/c00057.vtc
+++ b/bin/varnishtest/tests/c00057.vtc
@@ -39,4 +39,13 @@ client c1 {
delay 7
-varnish v1 -cliok "panic.show"
+varnish v1 -cliok "panic.clear"
+
+# Also check without the handler
+varnish v1 -cliok "param.set sigsegv_handler off"
+varnish v1 -vcl+backend {} -start
+
+client c1 {
+ txreq
+ rxresp
+} -run
More information about the varnish-commit
mailing list