Skip to content

[release/10.0] Check for SIG_IGN and SIG_DFL before calling previous signal handler - #133177

Merged
JulieLeeMSFT merged 1 commit into
release/10.0from
backport/pr-132900-to-release/10.0
Sep 4, 2026
Merged

[release/10.0] Check for SIG_IGN and SIG_DFL before calling previous signal handler#133177
JulieLeeMSFT merged 1 commit into
release/10.0from
backport/pr-132900-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backport of #132900 to release/10.0

/cc @jtschuster

Customer Impact

  • Customer reported
  • Found internally

macOS doesn't clear sa_flags when calling execve. When dotnet is started from a process that sets a signal handler, the handler is cleared, but not the sa_flags. When the runtime gets a signal from an external source, it sees a stale SA_SIGINGO and tries to call the previous signal handler, but the pointer is set to SIG_IGN or SIG_DFL, which causes a segmentation fault and crashes the process. This change checks for those values before calling the previous signal handler. Also adds a regression test for the issue.

Regression

  • Yes
  • No

Testing

The issue was reproduced in a regression test that was added to coreclr tests. The test fails without the fix and passes with it.

Risk

Low. The actual source change is small and targeted.

…132900)

macOS doesn't clear sa_flags when calling execve. When dotnet is started
from a process that sets a signal handler, the handler is cleared, but
not the sa_flags. When the runtime gets a signal from an external
source, it sees a stale SA_SIGINGO and tries to call the previous signal
handler, but the pointer is set to SIG_IGN or SIG_DFL, which causes a
crash. This change checks for those values before calling the previous
signal handler. Also adds a regression test for the issue.

Fixes #132581

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jtschuster jtschuster self-assigned this Sep 3, 2026
@jtschuster jtschuster added Servicing-consider Issue for next servicing release review os-mac-os-x macOS aka OSX area-VM-coreclr labels Sep 3, 2026
@jtschuster jtschuster added this to the 10.0.x milestone Sep 3, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@JulieLeeMSFT JulieLeeMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 3, 2026
@JulieLeeMSFT

Copy link
Copy Markdown
Member

/ba-g known issues on system.net.

@JulieLeeMSFT
JulieLeeMSFT merged commit 8250bd5 into release/10.0 Sep 4, 2026
129 of 139 checks passed
@JulieLeeMSFT
JulieLeeMSFT deleted the backport/pr-132900-to-release/10.0 branch September 4, 2026 20:27
@github-project-automation github-project-automation Bot moved this to Done in AppModel Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr os-mac-os-x macOS aka OSX Servicing-approved Approved for servicing release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants