[pcre-dev] pcre2 and the machine stack

Αρχική Σελίδα
Delete this message
Συντάκτης: Nils Goroll
Ημερομηνία:  
Προς: pcre-dev
Αντικείμενο: [pcre-dev] pcre2 and the machine stack
As a suggestion regarding pcre2:

For varnish, we want to make sure we don't run out of machine stack ( context:
https://www.varnish-cache.org/trac/ticket/1576 ), so at this point the plan is
to calculate the remaining stack space (conservatively, which we can because we
init our threads) and set the recursion limit based on the pcre frame size. For
JIT, I have not yet understood how likely it is to run out of the 32K default.
We'd like to avoid pcre_jit_stack_alloc or other overflow space.

With this in mind and talking about pcre2, it would be great if the new API
could support callers better with respect to stack management, for instance by
allowing to specify the (estimated) remaining machine stack available and
appropriate error handling within pcre.


Nils