Skip to content

[dialyzer] crash in erl_types:cons_hd #6580

Closed
@RobinMorisset

Description

@RobinMorisset

On master, the following testcase:

f() ->
    <<
        0
     || _ <-
            case ok of
                X ->
                    <<0 || _ <- []>>
            end,
        X <- 0,
        #{X := Y} <- 0
    >>.

crashes dialyzer with the following error message:

dialyzer: Analysis failed with error:
{function_clause,[{erl_types,cons_hd,
                             [unit],
                             [{file,"erl_types.erl"},{line,1331}]},
                  {dialyzer_dataflow,do_bind_pat_vars,6,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,1471}]},
                  {dialyzer_dataflow,bind_pat_vars,5,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,1433}]},
                  {dialyzer_dataflow,do_clause,7,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,1233}]},
                  {dialyzer_dataflow,handle_clauses,9,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,1199}]},
                  {dialyzer_dataflow,handle_case,3,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,932}]},
                  {dialyzer_dataflow,analyze_loop,1,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,186}]},
                  {dialyzer_dataflow,analyze_module,6,
                                     [{file,"dialyzer_dataflow.erl"},
                                      {line,150}]}]}

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