Conversation
Contributor
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a potential reentrancy issue during Environment.FailFast execution and adds GC protection for a STRINGREF that could be moved during garbage collection.
- Adds GC protection around
pString->GetSString(result)to prevent the STRINGREF from being moved during potential GC triggers - Implements a reentrancy guard using
alreadyfailingcounter to prevent recursive exception message retrieval during FailFast handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/coreclr/vm/excep.cpp | Adds GCPROTECT_BEGIN/END around GetSString call to protect STRINGREF from being moved during GC |
| src/coreclr/classlibnative/bcltype/system.cpp | Adds reentrancy counter to prevent calling GetExceptionMessage during nested FailFast calls |
jkotas
reviewed
Nov 3, 2025
21 tasks
This was referenced Nov 3, 2025
Open
jkotas
reviewed
Nov 4, 2025
jkotas
reviewed
Nov 4, 2025
jkotas
approved these changes
Nov 4, 2025
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
jkotas
reviewed
Nov 4, 2025
Member
Author
|
/ba-g CI timeout - android helix |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
FailFastwe don't call managed code (which likely causes the recursive FailFast).Contributes to #121107