Skip to content

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
@sbomer sbomer requested a review from marek-safar as a code owner October 2, 2024 20:54
@ghost ghost 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
@dotnet-policy-service
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
sirntar pushed a commit to sirntar/runtime that referenced this pull request Oct 8, 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.
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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