Author: Giuseppe D'Angelo Date: To: pcre-dev Subject: [pcre-dev] A clarification on pcrejit docs
The pcre_assign_jit_stack man page says that
"If callback is NULL and data is NULL, an internal 32K block on the
machine stack is used."
And the pcrejit man page says that
"When the compiled JIT code runs, it needs a block of memory to use as
a stack. By default, it uses 32K on the machine stack"
This makes me think that it's perfectly safe to use the same pcre* and
JIT-compiled pcre_extra* blocks in more threads at the same time,
because the 32k block will be taken from each thread's stack (and
these stacks are obviously different).
However, the same pcrejit man page says that "In a multithread
application, each thread must use its own JIT stack. " and even
suggests creating JIT stacks and putting them in thread local storage.
What's the right interpretation? :-)
This message was posted to the following mailing lists: