summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-08-29 09:35:14 +0200
committerRemi Collet <remi@php.net>2024-08-29 09:35:14 +0200
commit5c50c50a3a5fcb07d5360947baa45ec1977ffa0b (patch)
treea9372e13ec8611e51fa1467798b0d441bcfd1e57
parent287d614b3203c06fe3b2af137b5e99c33f82f6d6 (diff)
add minimal patch for 8.4.0beta3 from
https://github.com/derickr/vld/pull/83
-rw-r--r--php-pecl-vld.spec8
-rw-r--r--vld-pr83.patch39
2 files changed, 46 insertions, 1 deletions
diff --git a/php-pecl-vld.spec b/php-pecl-vld.spec
index 54ea477..1e96e31 100644
--- a/php-pecl-vld.spec
+++ b/php-pecl-vld.spec
@@ -23,11 +23,12 @@ Summary: Dump the internal representation of PHP scripts
Name: %{?scl_prefix}php-pecl-%{pecl_name}
License: PHP-3.01
Version: 0.18.0
-Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
Patch0: %{pecl_name}-upstream.patch
+Patch1: %{pecl_name}-pr83.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -57,6 +58,7 @@ sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
pushd %{sources}
%patch -P0 -p1
+%patch -P1 -p1
#: Fix version
#sed -e 's/"0.16.0"/"%{version}"/' -i vld.c
@@ -163,6 +165,10 @@ done
%changelog
+* Thu Aug 22 2024 Remi Collet <remi@remirepo.net> - 0.18.0-4
+- add minimal patch for 8.4.0beta3 from
+ https://github.com/derickr/vld/pull/83
+
* Fri Jul 12 2024 Remi Collet <remi@remirepo.net> - 0.18.0-3
- add upstream patch for PHP 8.4
diff --git a/vld-pr83.patch b/vld-pr83.patch
new file mode 100644
index 0000000..376b342
--- /dev/null
+++ b/vld-pr83.patch
@@ -0,0 +1,39 @@
+From d1d9b0823ec8048dfabea506f4fcd337c047deac Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 22 Aug 2024 08:34:30 +0200
+Subject: [PATCH] minimal fix for 8.4.0beta3
+
+---
+ srm_oparray.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/srm_oparray.c b/srm_oparray.c
+index 3bd6dce..e5fd05f 100644
+--- a/srm_oparray.c
++++ b/srm_oparray.c
+@@ -1116,7 +1116,9 @@ int vld_find_jumps(zend_op_array *opa, unsigned int position, size_t *jump_count
+
+ } else if (
+ opcode.opcode == ZEND_GENERATOR_RETURN ||
++#if PHP_VERSION_ID < 80400
+ opcode.opcode == ZEND_EXIT ||
++#endif
+ opcode.opcode == ZEND_THROW ||
+ #if PHP_VERSION_ID >= 80000
+ opcode.opcode == ZEND_MATCH_ERROR ||
+@@ -1265,6 +1267,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned int position, vld_set *set,
+ break;
+ }
+
++#if PHP_VERSION_ID < 80400
+ /* See if we have an exit instruction */
+ if (opa->opcodes[position].opcode == ZEND_EXIT) {
+ VLD_PRINT(1, "Exit found\n");
+@@ -1272,6 +1275,7 @@ void vld_analyse_branch(zend_op_array *opa, unsigned int position, vld_set *set,
+ branch_info->branches[position].start_lineno = opa->opcodes[position].lineno;
+ break;
+ }
++#endif
+ /* See if we have a return instruction */
+ if (
+ opa->opcodes[position].opcode == ZEND_RETURN