summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2021-01-28 16:24:39 +0100
committerRemi Collet <remi@php.net>2021-01-28 16:24:39 +0100
commit067f7e4150d8f9bddf6b198c9c7826565ee549b0 (patch)
tree42116f7df6b9a85c80213506b8ad914e60a8aa7d
parent21f861225a627cc0143dbbd7b03c2686a77409d5 (diff)
downloadphp-git-067f7e4150d8f9bddf6b198c9c7826565ee549b0.tar.gz
Fix #80682 opcache doesn't honour pcre.jit option
-rw-r--r--ext/opcache/zend_accelerator_blacklist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c
index 889fcabd79..5c6bd76821 100644
--- a/ext/opcache/zend_accelerator_blacklist.c
+++ b/ext/opcache/zend_accelerator_blacklist.c
@@ -185,10 +185,12 @@ static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist)
return;
}
#ifdef HAVE_PCRE_JIT_SUPPORT
- if (0 > pcre2_jit_compile(it->re, PCRE2_JIT_COMPLETE)) {
- /* Don't return here, even JIT could fail to compile, the pattern is still usable. */
- pcre2_get_error_message(errnumber, pcre_error, sizeof(pcre_error));
- zend_accel_error(ACCEL_LOG_WARNING, "Blacklist JIT compilation failed, %s\n", pcre_error);
+ if (PCRE_G(jit)) {
+ if (0 > pcre2_jit_compile(it->re, PCRE2_JIT_COMPLETE)) {
+ /* Don't return here, even JIT could fail to compile, the pattern is still usable. */
+ pcre2_get_error_message(errnumber, pcre_error, sizeof(pcre_error));
+ zend_accel_error(ACCEL_LOG_WARNING, "Blacklist JIT compilation failed, %s\n", pcre_error);
+ }
}
#endif
/* prepare for the next iteration */