Skip to content

[release/6.0] Handle when DestroyStructure API passes null to the IL marshaller - #62002

Merged
safern merged 1 commit into
release/6.0from
backport/pr-61985-to-release/6.0
Dec 15, 2021
Merged

[release/6.0] Handle when DestroyStructure API passes null to the IL marshaller#62002
safern merged 1 commit into
release/6.0from
backport/pr-61985-to-release/6.0

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Nov 24, 2021

Copy link
Copy Markdown
Contributor

Backport of #61985 to release/6.0

/cc @AaronRobinsonMSFT

Customer Impact

The issue was reported by a customer. This seems to be additional fallout from the field marshaling work done in early .NET 5. This is a regression in behavior from .NET Framework. The scenario is likely not common given the code has been broken since early .NET 5. The fix will impact all non-blittable field marshaling due to the current architecture. There is a workaround if the types can be changed, but otherwise there is no mitigation.

See #61839

Testing

Additional testing for the targeted scenario was added.

Risk

Medium. The struct field marshaling code paths have proven to be very dangerous to alter. In this case, since the bug would always result in crashing behavior it is lower than High, but does still introduce some risk. The most obvious risk here would be for products that have not tried to port from .NET Framework yet.

… valuetypes. This is an issue with field marshallers of nested non-blittable types.
@AaronRobinsonMSFTAaronRobinsonMSFT added the Servicing-consider Issue for next servicing release review label Nov 24, 2021
@AaronRobinsonMSFTAaronRobinsonMSFT added this to the 6.0.x milestone Nov 24, 2021
@AaronRobinsonMSFT

Copy link
Copy Markdown
Member

/cc @jkoritzinsky@elinor-fung

@jkotasjkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@leecowleecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 30, 2021
@leecowleecow modified the milestones: 6.0.x, 6.0.2Nov 30, 2021
@safern
safern merged commit b5305cb into release/6.0Dec 15, 2021
@safern
safern deleted the backport/pr-61985-to-release/6.0 branch December 15, 2021 18:38
@ghostghost locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Interop-coreclrServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@AaronRobinsonMSFT@jkoritzinsky@jkotas@davidwrighton@leecow@safern