mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed GH-12809: Segmentation fault in exception handler with CALL VM on AArch64
This commit is contained in:
parent
6bd680b824
commit
d41ee53aaf
1 changed files with 3 additions and 0 deletions
|
@ -2683,6 +2683,7 @@ static void zend_jit_init_ctx(zend_jit_ctx *jit, uint32_t flags)
|
||||||
/* Stack must be 16 byte aligned */
|
/* Stack must be 16 byte aligned */
|
||||||
/* TODO: select stack size ??? */
|
/* TODO: select stack size ??? */
|
||||||
#if defined(IR_TARGET_AARCH64)
|
#if defined(IR_TARGET_AARCH64)
|
||||||
|
jit->ctx.flags |= IR_USE_FRAME_POINTER;
|
||||||
jit->ctx.fixed_stack_frame_size = sizeof(void*) * 16; /* 10 saved registers and 6 spill slots (8 bytes) */
|
jit->ctx.fixed_stack_frame_size = sizeof(void*) * 16; /* 10 saved registers and 6 spill slots (8 bytes) */
|
||||||
#elif defined(_WIN64)
|
#elif defined(_WIN64)
|
||||||
jit->ctx.fixed_stack_frame_size = sizeof(void*) * 11; /* 8 saved registers and 3 spill slots (8 bytes) */
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
ir_match(ctx);
|
ir_match(ctx);
|
||||||
|
#if !defined(IR_TARGET_AARCH64)
|
||||||
ctx->flags &= ~IR_USE_FRAME_POINTER; /* don't use FRAME_POINTER even with ALLOCA, TODO: cleanup this ??? */
|
ctx->flags &= ~IR_USE_FRAME_POINTER; /* don't use FRAME_POINTER even with ALLOCA, TODO: cleanup this ??? */
|
||||||
|
#endif
|
||||||
ir_assign_virtual_registers(ctx);
|
ir_assign_virtual_registers(ctx);
|
||||||
ir_compute_live_ranges(ctx);
|
ir_compute_live_ranges(ctx);
|
||||||
ir_coalesce(ctx);
|
ir_coalesce(ctx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue