Skip to content
Permalink
Browse files

Fixed bug #76514 Regression in preg_match makes it fail with PREG_JIT…

…_STACKLIMIT_ERROR

Looks like some patterns might require more stack for JIT execution. It
is a regression, as the same pattern was passing using JIT.
  • Loading branch information
weltling committed Jun 22, 2018
1 parent 71e1847 commit bb2f1a683003559ada1c70166557bd7ac2845a11
Showing with 543 additions and 1 deletion.
  1. +1 −1 ext/pcre/php_pcre.c
  2. +542 −0 ext/pcre/tests/bug76514.phpt
@@ -75,7 +75,7 @@ PHPAPI ZEND_DECLARE_MODULE_GLOBALS(pcre)

#ifdef HAVE_PCRE_JIT_SUPPORT
#define PCRE_JIT_STACK_MIN_SIZE (32 * 1024)
#define PCRE_JIT_STACK_MAX_SIZE (64 * 1024)
#define PCRE_JIT_STACK_MAX_SIZE (192 * 1024)
ZEND_TLS pcre2_jit_stack *jit_stack = NULL;
#endif
ZEND_TLS pcre2_general_context *gctx = NULL;

0 comments on commit bb2f1a6

Please sign in to comment.
You can’t perform that action at this time.