1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-15 04:05:15 +03:00
aports/testing/php82-pecl-xdebug/fix-build.patch
2022-06-10 15:04:28 +03:00

32 lines
1.1 KiB
Diff

From 7b4fcfe6ae300e272113fa612d64b19815bece80 Mon Sep 17 00:00:00 2001
From: Shivam Mathur <shivam_jpr@hotmail.com>
Date: Tue, 11 Jan 2022 03:30:41 +0000
Subject: [PATCH 1/2] Fix for removal of JMPZNZ opcode in PHP 8.2
JMPZNZ opcode has been removed in PHP 8.2. So this limits the
handling of the JMPZNZ opcode to lower versions.
Ref: https://github.com/php/php-src/pull/7857
---
src/coverage/code_coverage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/coverage/code_coverage.c b/src/coverage/code_coverage.c
index 16be68747..31ec7feec 100644
--- a/src/coverage/code_coverage.c
+++ b/src/coverage/code_coverage.c
@@ -300,11 +300,13 @@ static int xdebug_find_jumps(zend_op_array *opa, unsigned int position, size_t *
*jump_count = 2;
return 1;
+#if PHP_VERSION_ID < 80200
} else if (opcode.opcode == ZEND_JMPZNZ) {
jumps[0] = XDEBUG_ZNODE_JMP_LINE(opcode.op2, position, base_address);
jumps[1] = position + ((int32_t) opcode.extended_value / (int32_t) sizeof(zend_op));
*jump_count = 2;
return 1;
+#endif
} else if (opcode.opcode == ZEND_FE_FETCH_R || opcode.opcode == ZEND_FE_FETCH_RW) {
jumps[0] = position + 1;