Skip to content

[erlc] Another internal error in beam_ssa_type:concrete_type/2 #11406

Description

@RobinMorisset

Describe the bug
Running erlc on

-feature(compr_assign, enable).
-module(beam_ssa_type_concrete_type_block).
-export([f/0]).

f() ->
    [ok || _ = begin V = ok end, V].

results in the following crash:

Function: f/0
Sub pass ssa_opt_type_start
found_bugs/beam_ssa_type_concrete_type_block.erl: internal error in pass beam_ssa_opt:
exception error: no match of right hand side value #{}
  in function  beam_ssa_type:concrete_type/2 (beam_ssa_type.erl:2585)
  in call from beam_ssa_type:simplify_arg/3 (beam_ssa_type.erl:1918)
  in call from beam_ssa_type:'-simplify_args/3-lc$^0/1-0-'/3 (beam_ssa_type.erl:1911)
  in call from beam_ssa_type:'-simplify_args/3-lc$^0/1-0-'/3 (beam_ssa_type.erl:1911)
  in call from beam_ssa_type:sig_is/7 (beam_ssa_type.erl:296)
  in call from beam_ssa_type:sig_bs/8 (beam_ssa_type.erl:271)
  in call from beam_ssa_type:sig_function_1/4 (beam_ssa_type.erl:236)
  in call from beam_ssa_type:do_sig_function/4 (beam_ssa_type.erl:180)

Affected versions
master (6e00d8c)

Additional context
This looks very similar to #11366 (both in testcase and error message), but was not fixed by #11390.

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