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

[release/7.0] Fix nested non-byref like VC with no pointer fields #80873

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Jan 19, 2023

Backport of #80642 that fixes #80624

Customer Impact

Customer reported issue with nested ref structs. A TypeLoadException can occur when a non-ByRefLike struct contains other structs marked with explicit layout. This was a regression introduced when adding ref field support in #65246.

Testing

New tests have been added for this failure case and others in the same area.

Risk

Low. The fix here is a permitting behavior that existed in .NET 6 but folding in the ref field logic. The changes to make that support are simple enough and should avoid the failing behavior that was acknowledged by an assert in debug builds. This implements the needed path.

* Fix nested non-byref like VC with no pointer fields
@AaronRobinsonMSFT AaronRobinsonMSFT added Servicing-consider Issue for next servicing release review area-TypeSystem-coreclr labels Jan 19, 2023
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 7.0.x milestone Jan 19, 2023
Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks just as good as the original version, thank you!

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. we will take for consideration in 7.0.x

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 20, 2023
@jeffschwMSFT jeffschwMSFT modified the milestones: 7.0.x, 7.0.4 Jan 20, 2023
@carlossanlop
Copy link
Member

Approved by Tactics for 7.0.4.
Signed off by area owners.
No OOB changes needed.
CI failures known and unrelated: #81391 and #81544
Ready to merge. :shipit:

@carlossanlop carlossanlop merged commit b1b4d63 into dotnet:release/7.0 Feb 8, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 11, 2023
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the net7_80642 branch April 9, 2023 05:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-TypeSystem-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants