[pcre-dev] Using JIT stacks for multiple patterns

Page principale
Supprimer ce message
Auteur: Christoph Becker
Date:  
À: pcre-dev
Sujet: [pcre-dev] Using JIT stacks for multiple patterns
Hi everybody!

The manual states[1]:

| You may safely use the same JIT stack for more than one pattern
| (either by assigning directly or by callback), as long as the
| patterns are all matched sequentially in the same thread.


I'm having a single threaded application. How could it happen that
patterns are not matched sequentially? AIUI, nested calls to
pcre_exec() or pcre_jit_exec() would have to be made, which could only
happen if this is done from a callback, such as the pcre_jit_callback
passed to pcre_assign_jit_stack().

Are there any other potential nested calls, or can I safely assume that
*sequential* calls to pcre_(jit_)exec() are safe to use the same JIT stack?

[1] <http://www.pcre.org/original/doc/html/pcrejit.html#SEC8>

--
Christoph M. Becker