diff options
author | Remi Collet <remi@php.net> | 2021-01-28 16:26:26 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2021-01-28 16:26:26 +0100 |
commit | 4a35f4a476f7f83ccadd859397456d3114231711 (patch) | |
tree | f47a4c83d08bd7e00ef487ce3e34bc3c4430405d /ext/opcache/zend_accelerator_blacklist.c | |
parent | 27eb81604bf3b78b1f2dc46fb4d0ca763294f33b (diff) | |
parent | aeb4f21549816570456feccb552d4c18c5d98945 (diff) | |
download | php-git-4a35f4a476f7f83ccadd859397456d3114231711.tar.gz |
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
NEWS
Fix #80682 opcache doesn't honour pcre.jit option
Diffstat (limited to 'ext/opcache/zend_accelerator_blacklist.c')
-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 9ae897b521..febe38aa92 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 */ |