From 067f7e4150d8f9bddf6b198c9c7826565ee549b0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 Jan 2021 16:24:39 +0100 Subject: Fix #80682 opcache doesn't honour pcre.jit option --- ext/opcache/zend_accelerator_blacklist.c | 10 ++++++---- 1 file 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 */ -- cgit v1.2.1 From aeb4f21549816570456feccb552d4c18c5d98945 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 Jan 2021 16:25:35 +0100 Subject: NEWS --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 6df4eecb57..3349f4acda 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2021, PHP 7.4.16 +- OPcache: + . Fixed bug #80682 (opcache doesn't honour pcre.jit option). (Remi) + - Phar: . Fixed bug #75850 (Unclear error message wrt. __halt_compiler() w/o semicolon) (cmb) -- cgit v1.2.1