Skip to content

erlc crash: internal error in sub pass ssa_opt_bsm_shortcut #6426

Closed
@RobinMorisset

Description

@RobinMorisset

On master with the following commit cherry-picked: 80fff40

-module(bvar).
-compile([export_all]).

f(<<X:0, _:X>>, <<Y:0, _:Y>>)  -> 
	0.

When compiled with erlc results in the following error message:

Sub pass ssa_opt_bsm_shortcut
Function: f/2
bvar.erl: internal error in pass beam_ssa_opt:
exception error: bad key: {b_var,20}
  in function  map_get/2
     called as map_get({b_var,20},#{33 => {0,3},{b_var,14} => 0,{b_var,15} => 0,{b_var,19} => 0})
     *** argument 1: not present in map
  in call from beam_ssa_opt:bsm_positions/2 (beam_ssa_opt.erl, line 1957)
  in call from beam_ssa_opt:ssa_opt_bsm_shortcut/1 (beam_ssa_opt.erl, line 1943)
  in call from compile:run_sub_passes_1/3 (compile.erl, line 422)
  in call from beam_ssa_opt:phase/4 (beam_ssa_opt.erl, line 114)
  in call from beam_ssa_opt:run_phases/3 (beam_ssa_opt.erl, line 77)
  in call from beam_ssa_opt:module/2 (beam_ssa_opt.erl, line 69)
  in call from compile:'-select_passes/2-anonymous-0-'/3 (compile.erl, line 681)

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions