-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix ResourceUpdater.Dispose() #120029
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
Fix ResourceUpdater.Dispose() #120029
Conversation
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
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.
LGTM otherwise, thank you!
Tagging subscribers to this area: @vitek-karas, @agocke |
After dotnet#120029, some of the code was unreachable. This change removes that code and standardizes the field style to the .NET Code Style guidelines.
/backport to release/10.0 |
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/18027400694 |
After #120029, some of the code was unreachable. This change removes that code and standardizes the field style to the .NET Code Style guidelines.
The apphost ResourceUpdater doesn't dispose of the PEReader when
leaveOpen
is true, but theleaveOpen
should only apply to the FileStream passed to the constructor. The PEReader is not accessible from the creator and cannot be disposed of elsewhere. This causes some race conditions, especially in cases where the PEReader ends up mapping the file into memory.Fixes dotnet/sdk#50784