Skip to content

Fix access violation when reporting fatal errors during startup - #121602

Merged
jkotas merged 1 commit into
dotnet:mainfrom
jkotas:issue-121596
Nov 14, 2025
Merged

jkotas merged 1 commit into
dotnet:mainfrom
jkotas:issue-121596

Conversation

@jkotas

@jkotas jkotas commented Nov 13, 2025

Copy link
Copy Markdown
Member

Fixes #121596

@jkotas

jkotas commented Nov 13, 2025

Copy link
Copy Markdown
Member Author

With this fix, we should see the following error message on unpatched Windows 10 machines:

Fatal error.
Your Windows doesn't fully support CET. Please install all available Windows updates.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an access violation that occurs when ThreadStore::HoldingThreadStore() is called during early startup from HandleFatalError, before the thread store has been initialized.

Key changes:

  • Added a null check for s_pThreadStore in HoldingThreadStore() to prevent dereferencing a null pointer during early startup error handling

@jkotas

jkotas commented Nov 14, 2025

Copy link
Copy Markdown
Member Author

/backport to release/10.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0 (link to workflow run)

@jkotas

jkotas commented Nov 14, 2025

Copy link
Copy Markdown
Member Author

/ba-g timeouts

@jkotas
jkotas merged commit 39d4138 into dotnet:main Nov 14, 2025
@jkotas
jkotas deleted the issue-121596 branch November 18, 2025 17:31
steveisok pushed a commit that referenced this pull request Nov 21, 2025
…g startup (#121605)

Backport of #121602 to release/10.0

/cc @jkotas

## Customer Impact

Allow customers to self-diagnose fail fasts encountered early during
startup, such as running on unpatched Windows 10 machine that does not
support CET correctly.

This change fixes crash during printing of the fail fast error message
early during startup.

- [x] Customer reported
- [ ] Found internally

## Regression

- [ ] Yes
- [x] No

## Testing

Manual simulated test

## Risk

Low

Co-authored-by: Jan Kotas <[email protected]>
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

csc.exe crashes with exit code -1073741819 (0xC0000005) with .NET SDK 10.0.100 on Windows 10 (VS 2026)

4 participants