Skip to content

Commit e356f98

Browse files
committed
Merge branch 'PHP-8.5' into PHP-8.6
* PHP-8.5: IR: Backport code buffer rollback fix
2 parents cc2b92c + 974487f commit e356f98

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎ext/opcache/jit/ir/ir_aarch64.dasc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9667,7 +9667,7 @@ void *ir_emit_code(ir_ctx *ctx, size_t *size_ptr)
96679667
if (ctx->code_buffer) {
96689668
if (ctx->code_buffer->pos == (char*)entry + size) {
96699669
/* rollback */
9670-
ctx->code_buffer->pos = (char*)entry - size;
9670+
ctx->code_buffer->pos = (char*)entry;
96719671
}
96729672
} else {
96739673
ir_mem_unmap(entry, size);
@@ -9790,7 +9790,7 @@ const void *ir_emit_exitgroup(uint32_t first_exit_point, uint32_t exit_points_pe
97909790
dasm_free(&dasm_state);
97919791
if (code_buffer->pos == (char*)entry + size) {
97929792
/* rollback */
9793-
code_buffer->pos = (char*)entry - size;
9793+
code_buffer->pos = (char*)entry;
97949794
}
97959795
return NULL;
97969796
}

‎ext/opcache/jit/ir/ir_x86.dasc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26954,7 +26954,7 @@ next_block:;
2695426954
if (ctx->code_buffer) {
2695526955
if (ctx->code_buffer->pos == (char*)entry + size) {
2695626956
/* rollback */
26957-
ctx->code_buffer->pos = (char*)entry - size;
26957+
ctx->code_buffer->pos = (char*)entry;
2695826958
}
2695926959
} else {
2696026960
ir_mem_unmap(entry, size);
@@ -27080,7 +27080,7 @@ const void *ir_emit_exitgroup(uint32_t first_exit_point, uint32_t exit_points_pe
2708027080
dasm_free(&dasm_state);
2708127081
if (code_buffer->pos == (char*)entry + size) {
2708227082
/* rollback */
27083-
code_buffer->pos = (char*)entry - size;
27083+
code_buffer->pos = (char*)entry;
2708427084
}
2708527085
return NULL;
2708627086
}

0 commit comments

Comments
 (0)