Repository navigation
Conversation
…8206) Fixes dotnet#138142 With PGO, a guessed delegate target can be inlined where it can never be right. In the repro, the inlinee does `stelem.ref` while the JIT sees the array as `int[]`. `getChildType` returns a null element handle for arrays of primitives, and `gtCanSkipCovariantStoreCheck` passed that to `isExactType` before checking for `NO_CLASS_HANDLE`. In Checked builds, the assert fired instead. Replace the assert with an early bail-out when the element type isn't `CORINFO_TYPE_CLASS` or the handle is null. [No diffs](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1697078&view=ms.vss-build-web.run-extensions-tab) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a77cc625-7a0c-4ac8-813a-8b0d25807906 (cherry picked from commit 73448b0)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8c6b9802-8643-479e-bbb4-f4e04e60fc0a
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
AndyAyersMS
approved these changes
Dec 1, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Issue #138142
main PR #138206
Description
Backport of #138206 to release/11.0. With PGO, a guessed delegate target can be inlined where it can never be right.
gtCanSkipCovariantStoreCheckthen passed a null element handle (array of primitives) toisExactType. The fix bails out early when the element type is not a class or the handle is null.Customer Impact
The JIT crashes (SIGSEGV) on the tiering background thread and the process dies. No unsafe code is needed.
Regression
Works on .NET 8 and 9, crashes on 10.0 and 11.0.
Testing
Test is backported.
Risk
Low. Adds an early bail-out, no diffs in main.
Note
PR description generated with GitHub Copilot.