From ca9b7d9ddb772e5ff27455871978da604aeda9df 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 c27b6e6f92006b..cd47a557eb4648 100644 --- a/src/coreclr/pal/src/exception/signal.cpp +++ b/src/coreclr/pal/src/exception/signal.cpp @@ -970,20 +970,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); + } } } }