-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix getting resource when ResourceResolve
returns assembly with resource that is an assembly ref
#112810
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
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 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);
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
…rce that is an assembly ref
6e899f9
to
7a9324f
Compare
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/13508910718 |
@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 128 Please backport manually! |
…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.
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.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.