Skip to content

Commit d41ee53

Browse files
committed
Fixed GH-12809: Segmentation fault in exception handler with CALL VM on AArch64
1 parent 6bd680b commit d41ee53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/opcache/jit/zend_jit_ir.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,6 +2683,7 @@ static void zend_jit_init_ctx(zend_jit_ctx *jit, uint32_t flags)
26832683
/* Stack must be 16 byte aligned */
26842684
/* TODO: select stack size ??? */
26852685
#if defined(IR_TARGET_AARCH64)
2686+
jit->ctx.flags |= IR_USE_FRAME_POINTER;
26862687
jit->ctx.fixed_stack_frame_size = sizeof(void*) * 16; /* 10 saved registers and 6 spill slots (8 bytes) */
26872688
#elif defined(_WIN64)
26882689
jit->ctx.fixed_stack_frame_size = sizeof(void*) * 11; /* 8 saved registers and 3 spill slots (8 bytes) */
@@ -2812,7 +2813,9 @@ static void *zend_jit_ir_compile(ir_ctx *ctx, size_t *size, const char *name)
28122813
}
28132814

28142815
ir_match(ctx);
2816+
#if !defined(IR_TARGET_AARCH64)
28152817
ctx->flags &= ~IR_USE_FRAME_POINTER; /* don't use FRAME_POINTER even with ALLOCA, TODO: cleanup this ??? */
2818+
#endif
28162819
ir_assign_virtual_registers(ctx);
28172820
ir_compute_live_ranges(ctx);
28182821
ir_coalesce(ctx);

0 commit comments

Comments
 (0)