Closed
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-reflection-emit |
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a regression in PersistedAssemblyBuilder signature emission that broke persisting function-pointer signatures with custom modifiers (modreq/modopt), and adds a regression test to cover the scenario.
Changes:
- Ensure function-pointer return/parameter custom modifiers are written when encoding function-pointer signatures.
- Extend
SaveFunctionPointerFieldscoverage to include an unmanaged function pointer with multiple calling conventions (includingSuppressGCTransition). - Update test utility helper nullability annotations for modifier/calling-convention arrays.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/libraries/System.Reflection.Emit/tests/Utilities.cs | Updates helper types used by tests to accept nullable arrays for conventions/modifiers. |
| src/libraries/System.Reflection.Emit/tests/PersistedAssemblyBuilder/AssemblySaveTypeBuilderTests.cs | Adds a new regression assertion via a delegate* unmanaged[Fastcall, SuppressGCTransition]<void> field persisted to disk and reloaded. |
| src/libraries/System.Reflection.Emit/src/System/Reflection/Emit/SignatureHelper.cs | Writes required/optional custom modifiers for function-pointer return/parameter types during signature encoding. |
Contributor
Author
|
Actually, it looks like this is only an issue in #123819, I'll add this commit there instead. |
This was referenced Feb 22, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#123925 breaks the functionality introduced in #119935.
This PR fixes this issue and adds an appropriate test. I decided to also address the comments in #124537 here.