Skip to content
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 ILLink behavior for modreq types #108494

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Fix ILLink behavior for modreq types #108494

merged 4 commits into from
Oct 4, 2024

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Oct 2, 2024

Cecil represents modreq/modopt in signatures as part of the TypeReference (using subclasses RequiredModifierType/OptionalModifierType). We need to unwrap these to get the correct behavior in IsNamedType.

This fixes the IsTypeInterestingForDataflow check for modreq/modopt types (Type modreq(IsVolatile) should be considered interesting for dataflow, and Type[] modreq(IsVolatile) should not). Includes a similar fix for function pointers.

Discovered while adding trim annotations in #108464.

@sbomer sbomer requested a review from a team October 2, 2024 20:54
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Oct 2, 2024
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Oct 2, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

@sbomer
Copy link
Member Author

sbomer commented Oct 4, 2024

/ba-g "dead-lettered work item"

@sbomer sbomer merged commit e183f70 into dotnet:main Oct 4, 2024
74 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants