Merge branch 'PHP-8.5' into PHP-8.6

* PHP-8.5:
  IR: Backport code buffer rollback fix
This commit is contained in:
ndossche committed 2026-10-26 21:11:21 +01:00
commit e356f985f1
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -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;
}