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
{{ message }}
Repository navigation
JIT: (bug) Operand reordering ignores GTF_ORDER_SIDEEFF on the second operand, moving a "proven safe" divide above its proof #134191
gtCanSwapOrder only rejects GTF_ORDER_SIDEEFF on the first node, so a divide that assertion prop proved cannot divide by zero gets commuted above the checked add that establishes the proof, and the wrong exception is thrown.
Regression on main: released .NET 10.0.12 throws OverflowException, and so does an unoptimized (tier-0) compile of the same source on main. No stress config or env vars required.
Also repros on much simpler shapes with DOTNET_JitStressModeNames=STRESS_REVERSE_FLAG.
Assertion prop proves y != 0 from the first divide, sets GTF_DIV_MOD_NO_BY_ZERO + GTF_ORDER_SIDEEFF and clears GTF_EXCEPT on the second divide; gtCanSwapOrder (gentree.cpp) then lets gtSetEvalOrder commute the ADD.
Activity
dotnet-policy-service commentedon Sep 18, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
MihuBot commentedon Sep 18, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):
GTF_IND_NONFAULTINGsetting that leads to an incorrect execution. #13762EgorBo commentedon Sep 18, 2026
Affected SDK versions:
JIT: Respect ordering side effects on the second operand when swapping (