Skip to content

Commit 19e7456

Browse files
[release/10.0] Revert forwarding activation signal (#124879)
Backport of #124877 to release/10.0 /cc @janvorli ## Customer Impact - [ ] Customer reported - [x] Found internally A recent change that was backported to .NET 10.0.4 (#124308) was found to cause problems to vsdbg. That problem is caused by part of the change that was actually additional to the fix that that change made and that is not that important. That part of the change started to forward activation signal to handlers registered before the coreclr. This change just reverts that part. ## Regression - [x] Yes - [ ] No #124308 ## Testing Local testing ## Risk Low. It just stops forwarding the signal which was the behavior until the recent change. Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
1 parent d0bbd28 commit 19e7456

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/coreclr/pal/src/exception/signal.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -936,20 +936,22 @@ static void inject_activation_handler(int code, siginfo_t *siginfo, void *contex
936936
CONTEXTToNativeContext(&winContext, ucontext);
937937
}
938938
}
939-
940-
// Call the original handler when it is not ignored or default (terminate).
941-
if (g_previous_activation.sa_flags & SA_SIGINFO)
942-
{
943-
_ASSERTE(g_previous_activation.sa_sigaction != NULL);
944-
g_previous_activation.sa_sigaction(code, siginfo, context);
945-
}
946939
else
947940
{
948-
if (g_previous_activation.sa_handler != SIG_IGN &&
949-
g_previous_activation.sa_handler != SIG_DFL)
941+
// Call the original handler when it is not ignored or default (terminate).
942+
if (g_previous_activation.sa_flags & SA_SIGINFO)
943+
{
944+
_ASSERTE(g_previous_activation.sa_sigaction != NULL);
945+
g_previous_activation.sa_sigaction(code, siginfo, context);
946+
}
947+
else
950948
{
951-
_ASSERTE(g_previous_activation.sa_handler != NULL);
952-
g_previous_activation.sa_handler(code);
949+
if (g_previous_activation.sa_handler != SIG_IGN &&
950+
g_previous_activation.sa_handler != SIG_DFL)
951+
{
952+
_ASSERTE(g_previous_activation.sa_handler != NULL);
953+
g_previous_activation.sa_handler(code);
954+
}
953955
}
954956
}
955957
}

0 commit comments

Comments
 (0)