Fix getting resource when ResourceResolve returns assembly with resource that is an assembly ref#112810
Merged
elinor-fung merged 1 commit intodotnet:mainfrom Feb 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 1 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (5)
- src/coreclr/vm/peassembly.cpp: Language not supported
- src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.il: Language not supported
- src/tests/Loader/ResourceResolve/ManifestResourceAssemblyRef.ilproj: Language not supported
- src/tests/Loader/ResourceResolve/ResourceAssembly.csproj: Language not supported
- src/tests/Loader/ResourceResolve/ResourceResolve.csproj: Language not supported
Comments suppressed due to low confidence (1)
src/tests/Loader/ResourceResolve/ResourceResolve.cs:33
- [nitpick] The variable name 'expected' is ambiguous. It should be renamed to 'expectedStream' for clarity.
Stream expected = resourceAssembly.GetManifestResourceStream(resourceName);
Contributor
|
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
…rce that is an assembly ref
6e899f9 to
7a9324f
Compare
AaronRobinsonMSFT
approved these changes
Feb 22, 2025
Member
Author
|
/backport to release/9.0-staging |
Contributor
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13508910718 |
Contributor
|
@elinor-fung backporting to "release/9.0-staging" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix getting resource when ResourceResolve returns assembly with resource that is an assembly ref
Using index info to reconstruct a base tree...
M src/coreclr/vm/peassembly.cpp
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/vm/peassembly.cpp
CONFLICT (content): Merge conflict in src/coreclr/vm/peassembly.cpp
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Fix getting resource when ResourceResolve returns assembly with resource that is an assembly ref
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
elinor-fung
added a commit
to elinor-fung/runtime
that referenced
this pull request
Feb 25, 2025
…rce that is an assembly ref (dotnet#112810) When getting a resource where `ResourceResolve` handler returns an assembly with a manifest resource that is an assembly ref, we incorrectly resolved the reference on the original assembly instead of the assembly returned by the handler and then also looked for the resource on the original assembly again instead of using the referenced assembly. This change includes a test for this case using IL. The manifest resource file (as opposed to assembly ref) case is already covered in libraries tests.
4 tasks
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.
When getting a resource where
ResourceResolvehandler returns an assembly with a manifest resource that is an assembly ref, we incorrectly resolved the reference on the original assembly instead of the assembly returned by the handler and then also looked for the resource on the original assembly again instead of using the referenced assembly.Added a test for this case using IL. The manifest resource file (as opposed to assembly ref) case is already covered in libraries tests.
As called out in #111537, this is a regression in .NET 9 from eae1542.