-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[release/10.0] Implement out-of-process SetThreadContext support for debugger detach #119904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+579
−192
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…er creation and desctruction and DispatchPatchOrSingleStep
This reverts commit dd6d28c.
…Controller creation and desctruction and DispatchPatchOrSingleStep" This reverts commit 367c638.
This reverts commit 240b372.
This reverts commit d80b6c4.
Debugger events are tracked out of process to determine which threads have outstanding SetThreadContextNeeded flares
…eadContextNeeded for improved readability
…lable on the platform
Please get code review and check test pipelines. |
JulieLeeMSFT
approved these changes
Sep 19, 2025
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
noahfalk
approved these changes
Sep 19, 2025
CC @jeffschwMSFT. |
/ba-g android failure is unrelated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #118849 to release/10.0
/cc @tommcdon
Customer Impact
Fixes customer reported issue #116870 in .NET 10
.NET support for CET was enabled by default in .NET 9, which uses out-of-process SetThreadContext in the debugger.. If there are any outstanding debug events in the application at detach, then the app could crash with an 0x80000003 exit code.
Regression
Customers that have CET-enabled hardware will see this issue when upgrading from a previous version of .NET 8 to .NET 9/10.
Testing
Visual Studio debugger testing
Risk
Low - the code changes are primarily designed to only impact detach. There was some refactoring in the out-of-process SetThreadContext but we have extensively tested the change.