Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 21, 2025

Backport of #118827 to release/10.0

/cc @AaronRobinsonMSFT @jkotas

Customer Impact

  • Customer reported
  • Found internally

This issue was reported in #118741. In 9.0.5 servicing a more strict check was made for this case - running managed code in DllMain. This more stricter case is now blocking IJW scenarios since the added assert will now trigger on all builds. This changes the assert to be non-retail builds for when IJW is involved, it is limited to scenarios involving IJW. This change is also not a fix as the underlying issue, running managed code in DllMain, since it represents a likely bug in MSVC. We are working with MSVC to get a fix for the underlying issue.

Regression

  • Yes
  • No

Introduced in #113055. This created an explicit check for a case that has long been an invalid scenario - no managed code may run during DllMain, see here.

Testing

The scenario was repro 100 % of the time due to emitted code. Removing the all build asserts avoids the check and allows for a non-noisy shut down when IJW assemblies are loaded in the process.

Risk

Low. This change is limited to scenarios when IJW assemblies are loaded and reverts back to not checking invalid behavior instead of being explicit. This resets to 9.0.4 behavior when IJW is in the process.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

@AaronRobinsonMSFT AaronRobinsonMSFT added Servicing-consider Issue for next servicing release review area-VM-coreclr labels Aug 21, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 10.0.0 milestone Aug 21, 2025
Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

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. please get a code review, we can merge when ready

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 21, 2025
@jeffschwMSFT jeffschwMSFT merged commit 11e7477 into release/10.0 Aug 21, 2025
101 of 107 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the backport/pr-118827-to-release/10.0 branch August 21, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants