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/9.0] Initialize managed and native values in the ICustomMarshaler marshaler to null when the other is null. #109096

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 22, 2024

Backport of #109092 to release/9.0

/cc @jkoritzinsky

Customer Impact

  • Customer reported
  • Found internally

Reported in #109033

User experience is uninitialized (or default initialized with a "random" sentinel) memory being passed to native code when the managed value is null, leading to crashes in native code when using MarshalAs(UnmanagedType.CustomMarshaler). Usage of this marshaler kind is relatively uncommon (not a default, explicitly opted in to), but for all usages, this case is likely to eventually show up.

Regression

  • Yes
  • No

.NET 9 preview 2

Testing

Verified against the previous implementation.

Risk

Low. I've re-validated all of the code paths and their expected values against the previous implementation before the regression.

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 22, 2024
@jkoritzinsky jkoritzinsky self-assigned this Oct 22, 2024
@AaronRobinsonMSFT AaronRobinsonMSFT added Servicing-consider Issue for next servicing release review area-Interop-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 22, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

@agocke agocke removed the Servicing-consider Issue for next servicing release review label Oct 22, 2024
@agocke
Copy link
Member

agocke commented Oct 22, 2024

Removing servicing-consider until we have everything filled out and ready

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 22, 2024
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. we will take for consideration in 9 GA

@jeffschwMSFT jeffschwMSFT added this to the 9.0.0 milestone Oct 22, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 22, 2024
@jeffschwMSFT jeffschwMSFT merged commit d5baa14 into release/9.0 Oct 22, 2024
91 of 100 checks passed
@jkoritzinsky jkoritzinsky deleted the backport/pr-109092-to-release/9.0 branch October 22, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Interop-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants