Skip to content

Commit

Permalink
stalker: Fix block events disrupting exclusive access on arm64 (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
saicao authored Feb 23, 2024
1 parent 8f54140 commit 02a3e50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gum/backend-arm64/gumstalker-arm64.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (C) 2023 Håvard Sørbø <[email protected]>
* Copyright (C) 2024 Francesco Tamagni <[email protected]>
* Copyright (C) 2024 Alex Soler <[email protected]>
* Copyright (C) 2024 Sai Cao <[email protected]>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 02a3e50

Please sign in to comment.