You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected:oob: IndexOutOfRangeException / null: NullReferenceException. Actual:oob: System.Int32 / null: System.Int32 — the array access never happens.
Notes:
csc -optimize+, then corerun repro.dll (fails with tiering on and with DOTNET_TieredCompilation=0). Building with -optimize- throws correctly, and the IL for Get<T> is identical in both.
src/coreclr/jit/importercalls.cpp:5288-5307: the CORINFO_BOX_THISObject.GetType expansion calls impPopStack() and never re-attaches the receiver tree or its side effects, unlike the neighbouring IsBoxedValue branch which uses gtTryRemoveBoxUpstreamEffects.
Activity
dotnet-policy-service commentedon Sep 11, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
JIT: Preserve receiver side effects in constrained GetType calls (#13…
JIT: Preserve receiver side effects in constrained GetType calls (dot…
EgorBo commentedon Sep 18, 2026
Affected SDK versions: