Skip to content

Commit

Permalink
Handle no-postdominator case in finalizer pass
Browse files Browse the repository at this point in the history
This pass was assuming that the post-dominator of all finalizer uses
exists as a real BB in the CFG.
  • Loading branch information
topolarity committed Jun 11, 2024
1 parent d0f165f commit ee6d95e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1614,6 +1614,7 @@ function try_resolve_finalizer!(ir::IRCode, idx::Int, finalizer_idx::Int, defuse
end
all(check_defuse, defuse.uses) || return nothing
all(check_defuse, defuse.defs) || return nothing
bb_insert_block != 0 || return nothing # there is no post-dominator of all uses

# Check #3
dominates(domtree, finalizer_bb, bb_insert_block) || return nothing
Expand Down

0 comments on commit ee6d95e

Please sign in to comment.