Skip to content

[release/10.0-preview6] Record struct packing even when falling back to auto layout #116770

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

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 17, 2025

Backport of #116608 to release/10.0-preview6

/cc @jkoritzinsky

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

This issue was initially discovered by the AppCompat team.

Types that use the StructLayout.Pack field can have incorrect layout. This can lead to anything from System.OverflowExceptions (like in the reporting issue #116475) to invalid data marshalling between managed and unmanaged code (silent bad codegen-like failures).

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

#113454

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Added unit tests for this specific scenario

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

Low. Tests were added that pass with the behavior before the regressing PR and now.

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.

lgtm. plese get a code review. we will take for consideration in 10 Preview 6

@artl93 artl93 added the Servicing-approved Approved for servicing release label Jun 19, 2025
@jkoritzinsky jkoritzinsky merged commit 39b3b90 into release/10.0-preview6 Jun 19, 2025
100 of 107 checks passed
@jkoritzinsky jkoritzinsky deleted the backport/pr-116608-to-release/10.0-preview6 branch June 19, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants