[php-src] master: Merge branch 'PHP-8.5' into PHP-8.6
| From: | ndossche | Date: | Mon, 26 Oct 2026 20:11:38 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.5' into PHP-8.6 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142767@lists.php.net to get a copy of this message | ||
Author: ndossche (ndossche)
Date: 2026-10-26T21:11:21+01:00
Commit: https://github.com/php/php-src/commit/e356f985f1c07bc184751660bcd25d91ffb7abde
Raw diff: https://github.com/php/php-src/commit/e356f985f1c07bc184751660bcd25d91ffb7abde.diff
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5:
IR: Backport code buffer rollback fix
Changed paths:
M ext/opcache/jit/ir/ir_aarch64.dasc
M ext/opcache/jit/ir/ir_x86.dasc
Diff:
diff --git a/ext/opcache/jit/ir/ir_aarch64.dasc b/ext/opcache/jit/ir/ir_aarch64.dasc
index 539108dec9ac..f9440ac7205b 100644
--- a/ext/opcache/jit/ir/ir_aarch64.dasc
+++ b/ext/opcache/jit/ir/ir_aarch64.dasc
@@ -9667,7 +9667,7 @@ void *ir_emit_code(ir_ctx *ctx, size_t *size_ptr)
if (ctx->code_buffer) {
if (ctx->code_buffer->pos == (char*)entry + size) {
/* rollback */
- ctx->code_buffer->pos = (char*)entry - size;
+ ctx->code_buffer->pos = (char*)entry;
}
} else {
ir_mem_unmap(entry, size);
@@ -9790,7 +9790,7 @@ const void *ir_emit_exitgroup(uint32_t first_exit_point, uint32_t
exit_points_pe
dasm_free(&dasm_state);
if (code_buffer->pos == (char*)entry + size) {
/* rollback */
- code_buffer->pos = (char*)entry - size;
+ code_buffer->pos = (char*)entry;
}
return NULL;
}
diff --git a/ext/opcache/jit/ir/ir_x86.dasc b/ext/opcache/jit/ir/ir_x86.dasc
index 5ce20343bd00..73c4d8366ef8 100644
--- a/ext/opcache/jit/ir/ir_x86.dasc
+++ b/ext/opcache/jit/ir/ir_x86.dasc
@@ -26954,7 +26954,7 @@ next_block:;
if (ctx->code_buffer) {
if (ctx->code_buffer->pos == (char*)entry + size) {
/* rollback */
- ctx->code_buffer->pos = (char*)entry - size;
+ ctx->code_buffer->pos = (char*)entry;
}
} else {
ir_mem_unmap(entry, size);
@@ -27080,7 +27080,7 @@ const void *ir_emit_exitgroup(uint32_t first_exit_point, uint32_t
exit_points_pe
dasm_free(&dasm_state);
if (code_buffer->pos == (char*)entry + size) {
/* rollback */
- code_buffer->pos = (char*)entry - size;
+ code_buffer->pos = (char*)entry;
}
return NULL;
}