-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[release/10.0] Fix ResourceUpdater.Dispose() #120136
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
Conversation
|
Tagging subscribers to this area: @vitek-karas, @agocke |
JulieLeeMSFT
left a comment
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.
|
/backport to release/10.0-rc2 |
|
Started backporting to release/10.0-rc2: https://github.com/dotnet/runtime/actions/runs/18139609347 |
Backport of #120029 to release/10.0
The apphost ResourceUpdater doesn't dispose of the PEReader when leaveOpen is true, but the leaveOpen 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 led to some race conditions in the SDK which caused the bundler to later fail to open the apphost.
Context: dotnet/sdk#50784
Customer Impact
Found in SDK tests.
Regression
[If yes, specify when the regression was introduced. Provide the PR or commit if known.]
Testing
There is a unit test to verify the disposal behavior. The race condition appeared in a few sdk tests after updates to host writer.
Risk
Low. This fixes a simple Dispose bug in a codepath that wasn't exercised until recently.
IMPORTANT: If this backport is for a servicing release, please verify that:
release/X.0-staging, notrelease/X.0.