stack ws workspace for pcre and others #1576

Federico Schwindt fgsch at lodoss.net
Wed Sep 3 01:56:32 CEST 2014


Fix aside should we consider using sigaltstack to also catch these crashes?
I imagine something like the attached but allocated on startup and shared
among all workers.

This might be specific to pcre at the moment but I can see its usefulness
in the vmod world.




On Tue, Sep 2, 2014 at 9:08 PM, Nils Goroll <slink at schokola.de> wrote:

>
>
> On 02/09/14 21:50, Nils Goroll wrote:
> > On 02/09/14 21:45, Poul-Henning Kamp wrote:
> >> What we really need is for pcre to tell us an estimate of how much
> >> stack-space is needed during compilation
> >
> > Is this possible? My understanding is that the recursion depth depends
> on the
> > data and thus all we can do is set a recursion limit for the stack size
> we have
> > available.
>
> This sounds close to the answer we are looking for:
>
> https://lists.exim.org/lurker/message/20130417.155604.5223f8b8.en.html
>
>
> > Is there a way to get some "stats" for a regexp like max recursion
> > depth, taken branches, steps needed for solution, ...?
>
> The pcretest program has a facility for determining the max recursion
> depth, given a pattern and a subject string. Grep for \M in the pcretest
> man page.
>
> pcretest(1):
>
>  If \M is present, pcretest calls pcre_exec() several times, with different
> values in the match_limit and match_limit_recursion fields of the
> pcre_extra
> data structure, until it finds the minimum numbers for each parameter that
> allow
> pcre_exec() to complete.
>
>
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140903/e7411f2b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 000-sigaltstack.patch
Type: text/x-patch
Size: 1543 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140903/e7411f2b/attachment-0001.bin>


More information about the varnish-dev mailing list