From 384e1aa926440275b8013a1adb592c0ed18b14d7 Mon Sep 17 00:00:00 2001 From: Pengfei Li Date: Tue, 5 Dec 2023 17:22:11 +0300 Subject: [PATCH] AArch64: Fix incorrect value of "ctx->code_size" There is a typo in `ir_aarch64.dasc` that may set `ctx->code_size` to an invalid value (-2). We don't find any test failure with the typo because currently `ctx->code_size` is only used in `zend_jit_get_veneer()`. This patch fixes the typo to avoid potential issues in the future. --- ir_aarch64.dasc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ir_aarch64.dasc b/ir_aarch64.dasc index 83582b3..86b9cde 100644 --- a/ir_aarch64.dasc +++ b/ir_aarch64.dasc @@ -5819,7 +5819,7 @@ void *ir_emit_code(ir_ctx *ctx, size_t *size_ptr) if (data.jmp_table_label) { ctx->code_size = dasm_getpclabel(&data.dasm_state, data.jmp_table_label); } else if (data.rodata_label) { - ctx->code_size = dasm_getpclabel(&data.dasm_state, data.jmp_table_label); + ctx->code_size = dasm_getpclabel(&data.dasm_state, data.rodata_label); } else { ctx->code_size = size; }