Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

erlc crash: internal error in sub pass ssa_opt_bsm_shortcut #6426

Closed
RobinMorisset opened this issue Nov 3, 2022 · 0 comments · Fixed by #6431
Closed

erlc crash: internal error in sub pass ssa_opt_bsm_shortcut #6426

RobinMorisset opened this issue Nov 3, 2022 · 0 comments · Fixed by #6431
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

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)
@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Nov 3, 2022
@bjorng bjorng self-assigned this Nov 4, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Nov 4, 2022
bjorng added a commit that referenced this issue Nov 7, 2022
…cut/GH-6426/OTP-18308

compiler: Eliminate internal error in sub pass ssa_opt_bsm_shortcut
@bjorng bjorng closed this as completed in 71136a9 Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants