<div dir="ltr">As discussed on irc the space can be allocated and shared among all threads instead of using the stack. <br>I've tested it this morning and works fine. In both cases the stack trace was present. <br><br>
Without this code if we overflow the stack we just get a coredump.<br><br>Regardless of this we should lower the pcre limits for the time being based on the information in pcrestack.<br></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Wed, Sep 3, 2014 at 9:13 AM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--------<br>
In message <<a href="mailto:CAJV_h0ZfT-BwxxLf-ddz1Lb5C%2BW0SKvFNkKQS79CDMM9ANdnWA@mail.gmail.com">CAJV_h0ZfT-BwxxLf-ddz1Lb5C+W0SKvFNkKQS79CDMM9ANdnWA@mail.gmail.com</a>><br>
, Federico Schwindt writes:<br>
<br>
+#ifdef HAVE_SIGALTSTACK<br>
+       if (cache_param->sigsegv_handler) {<br>
+               char stackbuf[MINSIGSTKSZ];<br>
+               stack_t ss;<br>
+<br>
+               ss.ss_size = sizeof(stackbuf);<br>
+               ss.ss_sp = stackbuf;<br>
+               ss.ss_flags = 0;<br>
+               (void)sigaltstack(&ss, NULL);<br>
+       }<br>
+#endif<br>
<br>
This will ad 2-4 KB to all threads.<br>
<br>
Also, I'm not convinced about the wisdom of allocating the sigstack<br>
on the normal stack...<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG         | TCP/IP since RFC 956<br>
FreeBSD committer       | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</div></div></blockquote></div><br></div>