Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[dialyzer] crash on is_function/2 with large negative arity #7181

@RobinMorisset

Description

@RobinMorisset

Describe the bug
Running dialyzer on the following:

f() when is_function(ok, -9223372036854775808) ->
    ok.

results in the following error:

dialyzer: Analysis failed with error:
{function_clause,[{erl_types,t_fun,
                             [-9223372036854775808,any],
                             [{file,"erl_types.erl"},{line,988}]},
                  {dialyzer_typesig,'-get_bif_constr/4-lc$^9/1-0-',1,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,1371}]},
                  {dialyzer_typesig,'-get_bif_constr/4-fun-10-',3,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,1371}]},
                  {dialyzer_typesig,solve_one_c,2,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,2232}]},
                  {dialyzer_typesig,v2_solve,3,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,1860}]},
                  {dialyzer_typesig,v2_solve_conj,12,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,2067}]},
                  {dialyzer_typesig,v2_solve_disj,10,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,1995}]},
                  {dialyzer_typesig,v2_solve_disjunct,3,
                                    [{file,"dialyzer_typesig.erl"},
                                     {line,1958}]}]}

Affected versions
master

Additional context
Here is an alternate test case that seems to trigger the same bug:

f(_V0) ->
    (is_function(ok, 9223372036854775807) andalso _V0) bor _V0.

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