From 48f3ac6f9ac838a8261aa8e86fec04ab2639d7ef Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Thu, 26 Feb 2026 01:34:41 +0100 Subject: [PATCH] Revert forwarding activation signal Recent change to fix lookup of current thread in the activation handler also added forwarding of the activation signal to the previously registered handler. That part of the change was unrelated to the actual issue the change was fixing. It turned out that it breaks vsdbg that doesn't expect to get the SIGUSR1 used for the activation on macOS. This change reverts that part of the change to unblock vsdbg. --- src/coreclr/pal/src/exception/signal.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/coreclr/pal/src/exception/signal.cpp b/src/coreclr/pal/src/exception/signal.cpp index 0dfd05d028a73b..732d1d5db05933 100644 --- a/src/coreclr/pal/src/exception/signal.cpp +++ b/src/coreclr/pal/src/exception/signal.cpp @@ -936,20 +936,22 @@ static void inject_activation_handler(int code, siginfo_t *siginfo, void *contex CONTEXTToNativeContext(&winContext, ucontext); } } - - // Call the original handler when it is not ignored or default (terminate). - if (g_previous_activation.sa_flags & SA_SIGINFO) - { - _ASSERTE(g_previous_activation.sa_sigaction != NULL); - g_previous_activation.sa_sigaction(code, siginfo, context); - } else { - if (g_previous_activation.sa_handler != SIG_IGN && - g_previous_activation.sa_handler != SIG_DFL) + // Call the original handler when it is not ignored or default (terminate). + if (g_previous_activation.sa_flags & SA_SIGINFO) + { + _ASSERTE(g_previous_activation.sa_sigaction != NULL); + g_previous_activation.sa_sigaction(code, siginfo, context); + } + else { - _ASSERTE(g_previous_activation.sa_handler != NULL); - g_previous_activation.sa_handler(code); + if (g_previous_activation.sa_handler != SIG_IGN && + g_previous_activation.sa_handler != SIG_DFL) + { + _ASSERTE(g_previous_activation.sa_handler != NULL); + g_previous_activation.sa_handler(code); + } } } }