-
Notifications
You must be signed in to change notification settings - Fork 5.2k
nested FailFast #121306
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
nested FailFast #121306
Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
There was a problem hiding this comment.
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 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 |
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
|
/ba-g CI timeout - android helix |
FailFastwe don't call managed code (which likely causes the recursive FailFast).Contributes to #121107