From 268368c7f7b9ec9033aadb713896219249bb292d Mon Sep 17 00:00:00 2001 From: s1341 Date: Tue, 13 Feb 2024 14:33:58 +0200 Subject: [PATCH] stalker-arm64: fix missing ret_reg --- gum/backend-arm64/gumstalker-arm64.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gum/backend-arm64/gumstalker-arm64.c b/gum/backend-arm64/gumstalker-arm64.c index 060076031e..7c3c2a51ad 100644 --- a/gum/backend-arm64/gumstalker-arm64.c +++ b/gum/backend-arm64/gumstalker-arm64.c @@ -692,7 +692,7 @@ static void gum_exec_block_write_jmp_transfer_code (GumExecBlock * block, static void gum_exec_block_write_ret_transfer_code (GumExecBlock * block, GumGeneratorContext * gc, arm64_reg ret_reg); static void gum_exec_block_write_chaining_return_code (GumExecBlock * block, - GumGeneratorContext * gc); + GumGeneratorContext * gc, arm64_reg ret_reg); static void gum_exec_block_write_slab_transfer_code (GumArm64Writer * from, GumArm64Writer * to); static void gum_exec_block_backpatch_slab (GumExecBlock * block, @@ -2960,7 +2960,7 @@ gum_stalker_iterator_put_chaining_return (GumStalkerIterator * self) gum_exec_block_write_adjust_depth (block, gc->code_writer, -1); - gum_exec_block_write_chaining_return_code (block, gc); + gum_exec_block_write_chaining_return_code (block, gc, ARM64_REG_LR); } GumMemoryAccess @@ -5038,12 +5038,13 @@ gum_exec_block_write_ret_transfer_code (GumExecBlock * block, GumGeneratorContext * gc, arm64_reg ret_reg) { - gum_exec_block_write_chaining_return_code (block, gc); + gum_exec_block_write_chaining_return_code (block, gc, ret_reg); } static void gum_exec_block_write_chaining_return_code (GumExecBlock * block, - GumGeneratorContext * gc) + GumGeneratorContext * gc, + arm64_reg ret_reg) { GumArm64Writer * cw = gc->code_writer; GumArm64Writer * cws = gc->slow_writer;