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 vftbl nested types finding #1343

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

dongle-the-gadget
Copy link
Contributor

In some cases (such as NativeAOT compilation), TypeExtensions.GetAbiToProjectionVftblPtr will not be able to get the nested Vftbl type in the specified helper type, resulting in the method being unable to get the field AbiToProjectionVftblPtr, causing the method to fail.

This error is caused due to the DynamicallyAccessedMemberTypes specified in the DynamicallyAccessedMembersAttribute of GetAbiToProjectionVftblPtr being inconsistent with that of FindVftblType, causing the FindVftblType method to be unable to get the nested Vftbl type.

This PR fixes that by adding in DynamicallyAccessedMemberTypes.PublicNestedTypes to GetAbiToProjectionVftblPtr, allowing FindVftblType to find nested types.

@manodasanW
Copy link
Member

Thanks @dongle-the-gadget for finding this and for the change.

@manodasanW manodasanW merged commit 546cffe into microsoft:master Aug 17, 2023
@dongle-the-gadget dongle-the-gadget deleted the contrib branch August 17, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants