Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

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

Backport of #99546 to release/8.0-staging

/cc @AndyAyersMS @SingleAccretion

Customer Impact

  • Customer reported
  • Found internally

JIT crash reported in #116180

Related to calling methods that return values and then ignoring those return values.

Regression

  • Yes
  • No

Not 100% sure, but seemingly a hard to hit bug that's been there a while. This phase was first added in .NET 7.

Testing

Verified the fix on the repro case in the issue.

Risk

Low. Fix was added to .NET 9 before release.

@AndyAyersMS
Copy link
Member

@dotnet/jit-contrib PTAL

@adityamandaleeka
Copy link
Member

adityamandaleeka commented Jun 3, 2025

Related to calling methods that return values and then ignoring those return values.

@AndyAyersMS Is that situation applicable to the repro in #116180 or just the older case? I tried changing code around in the repro case to avoid this issue but haven't been able to (trying to find a workaround until this is released in servicing).

@AndyAyersMS
Copy link
Member

Related to calling methods that return values and then ignoring those return values.

@AndyAyersMS Is that situation applicable to the repro in #116180 or just the older case? I tried changing code around in the repro case to avoid this issue but haven't been able to (trying to find a workaround until this is released in servicing).

To the repro. I tried various source manipulations there with no luck.

It is not just that the return value is ignored; it's also that the JIT can prove that the cast to IDisposable will fail and so removes that whole bit of code, and that the return value can be trivially predicted from the argument, so when all this is inlined it creates this odd orphaned local reference that trips up forward sub.

@adityamandaleeka
Copy link
Member

Ah, gotcha, thanks for the explanation.

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 8.0.x

@jeffschwMSFT jeffschwMSFT added Servicing-consider Issue for next servicing release review area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Jun 3, 2025
@jeffschwMSFT jeffschwMSFT added this to the 8.0.x milestone Jun 3, 2025
Copy link
Contributor

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

@rbhanda rbhanda modified the milestones: 8.0.x, 8.0.18 Jun 3, 2025
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jun 3, 2025
@AndyAyersMS AndyAyersMS merged commit 0e6061f into release/8.0-staging Jun 4, 2025
120 of 124 checks passed
@AndyAyersMS AndyAyersMS self-assigned this Jun 4, 2025
@jkotas jkotas deleted the backport/pr-99546-to-release/8.0-staging branch June 8, 2025 13:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants