Skip to content

Commit ee6d95e

Browse files
committed
Handle no-postdominator case in finalizer pass
This pass was assuming that the post-dominator of all finalizer uses exists as a real BB in the CFG.
1 parent d0f165f commit ee6d95e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

base/compiler/ssair/passes.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,7 @@ function try_resolve_finalizer!(ir::IRCode, idx::Int, finalizer_idx::Int, defuse
16141614
end
16151615
all(check_defuse, defuse.uses) || return nothing
16161616
all(check_defuse, defuse.defs) || return nothing
1617+
bb_insert_block != 0 || return nothing # there is no post-dominator of all uses
16171618

16181619
# Check #3
16191620
dominates(domtree, finalizer_bb, bb_insert_block) || return nothing

0 commit comments

Comments
 (0)