-
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
[Mono] Fix support for nested structs with explicit layout #61467
[Mono] Fix support for nested structs with explicit layout #61467
Conversation
Tagging subscribers to this area: Issue DetailsWIP Fixes #61385
|
…zsival/61385-nested-struct-with-explicit-layout
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.
LGTM. Thanks, Simon!
I suggested to use the m_class_XYZ
getters for accessing MonoClass fields in a couple of places. Technically class-init.c is allowed to use the fields directly, it's probably a good idea to only do it when you're also initializing the MonoClass.
Thanks for the feedback @lambdageek! I replaced the direct accesses with those getters as you suggested. |
…otnet#61467)" This reverts commit 64d1276.
These were fixed by dotnet#61467 Related to dotnet#36112
The current implementation of explicit struct layout check doesn't consider the layout of embedded value types. This new implementation recursively checks the inner structure of all embedded structs.
Fixes #61385