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

[cdac] Fix calculation of MethodDesc optional slot addresses #110491

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

elinor-fung
Copy link
Member

The cDAC was assuming that the additional data after a MethodDesc were each just pointers. That is only true for the non-vtable slot and native code slot, not method impl. This change includes the size of those additional slots in the data descriptor and uses them when computing the addresses those optional slots.

As part of this, I pulled out shared helpers around dealing with optional slots for use by MethodValidation and RuntimeTypeSystem_1.

Found this while trying to finish out RuntimeTypeSystem_1.GetMethodClassificationDataType for #109426 when doing a !dumpmt for a method table with explicit interface implementations (or !dumpmd on a method that is an explicit interface implementation).

Contributes to #99302, #109426

Copy link
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@elinor-fung elinor-fung merged commit 9e52085 into dotnet:main Dec 10, 2024
147 of 149 checks passed
@elinor-fung elinor-fung deleted the cdac-optionalSlots branch December 10, 2024 04:36
hez2010 pushed a commit to hez2010/runtime that referenced this pull request Dec 14, 2024
…t#110491)

The cDAC was assuming that the additional data after a MethodDesc were each just pointers. That is only true for the non-vtable slot and native code slot, not method impl. This change includes the size of those additional slots in the data descriptor and uses them when computing the addresses those optional slots.

As part of this, I pulled out shared helpers around dealing with optional slots for use by `MethodValidation` and `RuntimeTypeSystem_1`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants