Skip to content

Commit 4a35f4a

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: NEWS Fix #80682 opcache doesn't honour pcre.jit option
2 parents 27eb816 + aeb4f21 commit 4a35f4a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ext/opcache/zend_accelerator_blacklist.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,12 @@ static void zend_accel_blacklist_update_regexp(zend_blacklist *blacklist)
185185
return;
186186
}
187187
#ifdef HAVE_PCRE_JIT_SUPPORT
188-
if (0 > pcre2_jit_compile(it->re, PCRE2_JIT_COMPLETE)) {
189-
/* Don't return here, even JIT could fail to compile, the pattern is still usable. */
190-
pcre2_get_error_message(errnumber, pcre_error, sizeof(pcre_error));
191-
zend_accel_error(ACCEL_LOG_WARNING, "Blacklist JIT compilation failed, %s\n", pcre_error);
188+
if (PCRE_G(jit)) {
189+
if (0 > pcre2_jit_compile(it->re, PCRE2_JIT_COMPLETE)) {
190+
/* Don't return here, even JIT could fail to compile, the pattern is still usable. */
191+
pcre2_get_error_message(errnumber, pcre_error, sizeof(pcre_error));
192+
zend_accel_error(ACCEL_LOG_WARNING, "Blacklist JIT compilation failed, %s\n", pcre_error);
193+
}
192194
}
193195
#endif
194196
/* prepare for the next iteration */

0 commit comments

Comments
 (0)