-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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] Begin adding MethodDesc APIs to the RuntimeTypeSystem contract #104811
Conversation
Tagging subscribers to this area: @tommcdon |
b41dc36
to
a3d984f
Compare
8a59452
to
27fcddc
Compare
mock the additional data and globals
27fcddc
to
a46f91e
Compare
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Show resolved
Hide resolved
{ | ||
// may throw if the method desc at methodDescPointer is corrupted | ||
// we bypass the target data cache here because we don't want to cache non-validated data | ||
Data.MethodDesc desc = new Data.MethodDesc(_target, methodDescPointer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the existing non-validated types, we only read the parts that are needed to do the validation. For this, we're always going to read everything on MethodDesc/MethodDescChunk - are we expecting to need most of it / do we care about trying to read only what is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're going to need to access most of the fields of the MethodDesc base class for validation: you have to compute the MethodDescChunk address right away, and after that the first check is looking at the flags and the slot.
Co-authored-by: Elinor Fung <elfung@microsoft.com>
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.NonValidated.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Contributes to #99302
This is largely a placeholder just to get the MethodDesc/MethodDescChunk infrastructure in place. To further fill out
ValidateMethodDesc
and to implement theGetMethodDescData
DAC API, I also need to add an executable code manager contract for mapping between native code pointer values and methods. I'd like to do that as a separate PR.Debugged WinDbg enough to verify that
GetMethodDescData
is implemented enough to extract the correct MethodTable pointer value from a MethodDesc.