From 5cb40b419ac9afae70854be215852bd8019dfa0f Mon Sep 17 00:00:00 2001 From: Francesco Tamagni Date: Fri, 15 Dec 2023 17:09:21 +0100 Subject: [PATCH] interceptor: pause cloaked threads too This prevents random `SIGBUS` crashes on Frida's own threads while using `Interceptor` to hook functions living in the same page as any of the ones potentially used internally. --- gum/guminterceptor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gum/guminterceptor.c b/gum/guminterceptor.c index c434aedb1..aa0a7f6f1 100644 --- a/gum/guminterceptor.c +++ b/gum/guminterceptor.c @@ -11,7 +11,7 @@ #include "guminterceptor-priv.h" #include "gumlibc.h" #include "gummemory.h" -#include "gumprocess.h" +#include "gumprocess-priv.h" #include "gumtls.h" #include @@ -1049,7 +1049,7 @@ gum_interceptor_transaction_end (GumInterceptorTransaction * self) if (!rwx_supported) { suspend_op.current_thread_id = gum_process_get_current_thread_id (); - gum_process_enumerate_threads (gum_maybe_suspend_thread, &suspend_op); + _gum_process_enumerate_threads (gum_maybe_suspend_thread, &suspend_op); } for (cur = addresses; cur != NULL; cur = cur->next)