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

[dialyzer] crash in erl_types:cons_hd #6580

Closed
RobinMorisset opened this issue Dec 19, 2022 · 1 comment · Fixed by #6588
Closed

[dialyzer] crash in erl_types:cons_hd #6580

RobinMorisset opened this issue Dec 19, 2022 · 1 comment · Fixed by #6588
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

RobinMorisset commented Dec 19, 2022

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}]}]}
@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Dec 19, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Dec 19, 2022
jhogberg added a commit to jhogberg/otp that referenced this issue Dec 21, 2022
Calling this function t_is_none_or_unit/1 is like saying
t_is_integer_or_float/1 instead of t_is_number/1. I wouldn't be
the least bit surprised if this weird naming was the root cause of
erlangGH-6580.
@jhogberg
Copy link
Contributor

Thanks for your report, I've fixed it in #6588

@jhogberg jhogberg linked a pull request Dec 21, 2022 that will close this issue
jhogberg added a commit to jhogberg/otp that referenced this issue Dec 21, 2022
Calling this function t_is_none_or_unit/1 is like saying
t_is_integer_or_float/1 instead of t_is_number/1. I wouldn't be
the least bit surprised if this weird naming was the root cause of
erlangGH-6580.
jhogberg added a commit to jhogberg/otp that referenced this issue Dec 21, 2022
Calling this function t_is_none_or_unit/1 is like saying
t_is_integer_or_float/1 instead of t_is_number/1. I wouldn't be
the least bit surprised if this weird naming was the root cause of
erlangGH-6580.
jhogberg added a commit that referenced this issue Dec 22, 2022
…d-crash/GH-6580/OTP-18372

dialyzer: Fix bug in bind_checked_inf/4
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.

3 participants