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) fgUpdateFlowGraph dereferences a null predecessor list for a handler entry after tail duplication #134006
fgUpdateFlowGraph assumes bbRefs == 1 implies a non-empty predecessor list after tail duplication and conditional folding. Handler entries can have one artificial EH reference and no real predecessors, causing a JIT-time null dereference.
The process dies while JIT-compiling Test. JitDump reaches the tail-duplication fold and then faults:
BB03 [0002] 2 0 BB04 ... ( cond ) H0 finally {
Considering uncond to cond BB04 -> BB03
Conditional folded at BB04
BB04 becomes a BBJ_ALWAYS to BB05
Fatal error.
0xC0000005
Notes
Compiler::fgUpdateFlowGraph() (fgopt.cpp) checks bDest->bbRefs == 1 and then dereferences bDest->bbPreds; for handler/filter entries the remaining ref can be artificial and bbPreds can be null.
Also reproduces on released .NET 10.0.12 x64, surfacing as Internal CLR error. (0x80131506).
Guard on the predecessor list or account for artificial handler/filter entry refs before reading bbPreds.
changed the title [-]JIT (bug): fgUpdateFlowGraph dereferences a null predecessor list for a handler entry after tail duplication[/-][+]JIT: (bug) fgUpdateFlowGraph dereferences a null predecessor list for a handler entry after tail duplication[/+]on Sep 16, 2026
Activity
dotnet-policy-service commentedon Sep 15, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
[-]JIT (bug): fgUpdateFlowGraph dereferences a null predecessor list for a handler entry after tail duplication[/-][+]JIT: (bug) fgUpdateFlowGraph dereferences a null predecessor list for a handler entry after tail duplication[/+]JIT: use GetUniquePred in fgUpdateFlowGraph instead of assuming bbRef…
EgorBo commentedon Sep 18, 2026
Affected SDK versions:
JIT: Avoid null predecessor dereference after tail duplication (#134184)