summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-01-28 17:26:33 +0100
committerRemi Collet <remi@remirepo.net>2021-01-28 17:26:33 +0100
commitb6f6d87fa345d563b42f287549e0647f2f24da1d (patch)
tree73761f4c0dcf1c139e50d5128717810e243e1cbb
parent2bae1e78f69ef3b71016336d331d560a9f66343a (diff)
add upstream patch for https://bugs.php.net/80682
fix opcache doesn't honour pcre.jit option
-rw-r--r--php-bug80682.patch30
-rw-r--r--php73.spec9
2 files changed, 38 insertions, 1 deletions
diff --git a/php-bug80682.patch b/php-bug80682.patch
new file mode 100644
index 0000000..38f908b
--- /dev/null
+++ b/php-bug80682.patch
@@ -0,0 +1,30 @@
+From 067f7e4150d8f9bddf6b198c9c7826565ee549b0 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Thu, 28 Jan 2021 16:24:39 +0100
+Subject: [PATCH] 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 889fcabd7988..5c6bd76821a5 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 */
diff --git a/php73.spec b/php73.spec
index 64b05d4..d14111d 100644
--- a/php73.spec
+++ b/php73.spec
@@ -126,7 +126,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -191,6 +191,8 @@ Patch49: php-7.3.24-fpm.patch
Patch91: php-7.2.0-oci8conf.patch
# Upstream fixes (100+)
+# Backported from 7.4.16
+Patch100: php-bug80682.patch
# Security fixes (200+)
@@ -1171,6 +1173,7 @@ low-level PHP extension for the libsodium cryptographic library.
%patch91 -p1 -b .remi-oci8
# upstream patches
+%patch100 -p1 -b .bug80682
# security patches
@@ -2265,6 +2268,10 @@ fi
%changelog
+* Thu Jan 28 2021 Remi Collet <remi@remirepo.net> - 7.3.26-2
+- add upstream patch for https://bugs.php.net/80682
+ fix opcache doesn't honour pcre.jit option
+
* Tue Jan 5 2021 Remi Collet <remi@remirepo.net> - 7.3.26-1
- Update to 7.3.26 - http://www.php.net/releases/7_3_26.php