summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-03-14 10:09:48 +0100
committerRemi Collet <remi@php.net>2023-03-14 10:09:48 +0100
commitfcfc1e491dd3e67acb5dd61266c5691982c66688 (patch)
treede6ad6dc155e7a3a603b34630b8ae70735c3815c
parent70d9eb7af30307f2a4f4bbe8fee56230831ca57a (diff)
update patches
-rw-r--r--10756.patch21
-rw-r--r--php-8.1.0-systzdata-v23.patch (renamed from php-8.1.0-systzdata-v22.patch)3
-rw-r--r--php.spec7
3 files changed, 29 insertions, 2 deletions
diff --git a/10756.patch b/10756.patch
new file mode 100644
index 0000000..b980bf7
--- /dev/null
+++ b/10756.patch
@@ -0,0 +1,21 @@
+From 9f0022064677d180742642f264096a46c09269d3 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 3 Mar 2023 11:12:13 +0100
+Subject: [PATCH] remove assert raising strange behavior with GCC 10
+
+---
+ ext/reflection/php_reflection.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
+index 9a9685e7292e..42fec082c173 100644
+--- a/ext/reflection/php_reflection.c
++++ b/ext/reflection/php_reflection.c
+@@ -1748,7 +1748,6 @@ ZEND_METHOD(ReflectionFunctionAbstract, getClosureUsedVariables)
+
+ zend_op *opline = ops->opcodes + ops->num_args;
+ if (ops->fn_flags & ZEND_ACC_VARIADIC) {
+- ZEND_ASSERT(opline->opcode == ZEND_RECV_VARIADIC);
+ opline++;
+ }
+
diff --git a/php-8.1.0-systzdata-v22.patch b/php-8.1.0-systzdata-v23.patch
index d1c8d90..3157660 100644
--- a/php-8.1.0-systzdata-v22.patch
+++ b/php-8.1.0-systzdata-v23.patch
@@ -5,6 +5,7 @@ Add support for use of the system timezone database, rather
than embedding a copy. Discussed upstream but was not desired.
History:
+r23: fix possible buffer overflow
r22: retrieve tzdata version from /usr/share/zoneinfo/tzdata.zi
r21: adapt for timelib 2021.03 (in 8.1.0)
r20: adapt for timelib 2020.03 (in 8.0.10RC1)
@@ -456,7 +457,7 @@ index e41315efdb..4b6547c0a3 100644
+ size_t n;
+ char *data, *p;
+
-+ data = malloc(3 * sysdb->index_size + 7);
++ data = malloc(3 * sysdb->index_size + sizeof(FAKE_HEADER) - 1);
+
+ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1);
+
diff --git a/php.spec b/php.spec
index 1ee4db9..861cdf3 100644
--- a/php.spec
+++ b/php.spec
@@ -176,7 +176,7 @@ Patch10: php-7.0.7-curl.patch
# Use system nikic/php-parser
Patch41: php-8.1.0-parser.patch
# use system tzdata
-Patch43: php-8.1.0-systzdata-v22.patch
+Patch43: php-8.1.0-systzdata-v23.patch
# See http://bugs.php.net/53436
Patch44: php-7.4.0-phpize.patch
# Use -lldap_r for OpenLDAP
@@ -199,6 +199,8 @@ Patch91: php-7.2.0-oci8conf.patch
Patch300: php-7.4.0-datetests.patch
# WIP
+# https://github.com/php/php-src/pull/10756
+Patch400: 10756.patch
BuildRequires: gnupg2
BuildRequires: bzip2-devel
@@ -978,6 +980,9 @@ sed -e 's/php-devel/%{?scl_prefix}php-devel/' -i scripts/phpize.in
%patch300 -p1 -b .datetests
# WIP patch
+%if 0%{?rhel} == 7
+%patch400 -p1 -b .pr10756
+%endif
# Prevent %%doc confusion over LICENSE files
cp Zend/LICENSE ZEND_LICENSE