From 02a3e505654614c1dc0f91cc444388745edd85e0 Mon Sep 17 00:00:00 2001 From: SAI Date: Sat, 24 Feb 2024 07:04:08 +0800 Subject: [PATCH] stalker: Fix block events disrupting exclusive access on arm64 (#784) --- gum/backend-arm64/gumstalker-arm64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gum/backend-arm64/gumstalker-arm64.c b/gum/backend-arm64/gumstalker-arm64.c index a0c79c61f..12988a364 100644 --- a/gum/backend-arm64/gumstalker-arm64.c +++ b/gum/backend-arm64/gumstalker-arm64.c @@ -5,6 +5,7 @@ * Copyright (C) 2023 Håvard Sørbø * Copyright (C) 2024 Francesco Tamagni * Copyright (C) 2024 Alex Soler + * Copyright (C) 2024 Sai Cao <1665673333@qq.com> * * Licence: wxWindows Library Licence, Version 3.1 */ @@ -2900,7 +2901,9 @@ gum_stalker_iterator_next (GumStalkerIterator * self, self->generator_context->instruction = instruction; - if (is_first_instruction && (self->exec_context->sink_mask & GUM_BLOCK) != 0) + if (is_first_instruction && + (self->exec_context->sink_mask & GUM_BLOCK) != 0 && + (self->exec_block->flags & GUM_EXEC_BLOCK_USES_EXCLUSIVE_ACCESS) == 0) { gum_exec_block_write_block_event_code (self->exec_block, gc, GUM_CODE_INTERRUPTIBLE);