diff options
author | Remi Collet <remi@php.net> | 2021-01-28 16:27:00 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-01-28 16:27:00 +0100 |
commit | 88c339465e47e044acef74ed4ed3733d306e7992 (patch) | |
tree | 225682fbb9d999b4837d116ea3b757f903070554 | |
parent | c83cbc52a0f24dfbe7e0b6b2f4395e65cc926f20 (diff) | |
parent | b23a4256a62dbc789dc228578e153dfbff3c8324 (diff) | |
download | php-git-88c339465e47e044acef74ed4ed3733d306e7992.tar.gz |
Merge branch 'PHP-8.0'
* PHP-8.0:
NEWS
NEWS
Fix #80682 opcache doesn't honour pcre.jit option
-rw-r--r-- | ext/opcache/zend_accelerator_blacklist.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/opcache/zend_accelerator_blacklist.c b/ext/opcache/zend_accelerator_blacklist.c index 0c89839439..df9417db34 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 */ |