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 #9199

Open
ilya-klyuchnikov opened this issue Dec 16, 2024 · 1 comment
Open

Dialyzer crash #9199

ilya-klyuchnikov opened this issue Dec 16, 2024 · 1 comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@ilya-klyuchnikov
Copy link
Contributor

ilya-klyuchnikov commented Dec 16, 2024

Describe the bug

Dialyzer crashes

To Reproduce

(The code itself makes very little sense, but it crashes dialyzer)

-module(n2).
-export([swap/1]).
-nominal t1() :: none().
-nominal t2() :: none().

-record(r, {t1 :: t1(), t2 :: t2()}).

-spec swap(#r{}) -> #r{}.
swap(#r{t1 = T1, t2 = T2}) ->
  #r{t1 = T2, t2 = T1}.
dialyzer n2.erl
Proceeding with analysis...{error,{case_clause,{[],[]}},[{dialyzer,format_invalid_contract_details,1,[{file,"dialyzer.erl"},{line,1021}]},{dialyzer,message_to_string,3,[{file,"dialyzer.erl"},{line,892}]},{dialyzer,format_warning,2,[{file,"dialyzer.erl"},{line,750}]},{dialyzer_cl,'-print_warnings/1-lc$^0/1-0-',2,[{file,"dialyzer_cl.erl"},{line,821}]},{dialyzer_cl,print_warnings,1,[{file,"dialyzer_cl.erl"},{line,821}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,2315}]},{dialyzer_cl,return_value,2,[{file,"dialyzer_cl.erl"},{line,669}]},{dialyzer_cl,do_analysis,4,[{file,"dialyzer_cl.erl"},{line,428}]}]}
Runtime terminating during boot ({{case_clause,{[],[]}},[{dialyzer,format_invalid_contract_details,1,[{file,"dialyzer.erl"},{line,1021}]},{dialyzer,message_to_string,3,[{file,"dialyzer.erl"},{line,892}]},{dialyzer,format_warning,2,[{file,"dialyzer.erl"},{line,750}]},{dialyzer_cl,'-print_warnings/1-lc$^0/1-0-',2,[{file,"dialyzer_cl.erl"},{line,821}]},{dialyzer_cl,print_warnings,1,[{file,"dialyzer_cl.erl"},{line,821}]},{lists,foreach_1,2,[{file,"lists.erl"},{line,2315}]},{dialyzer_cl,return_value,2,[{file,"dialyzer_cl.erl"},{line,669}]},{dialyzer_cl,do_analysis,4,[{file,"dialyzer_cl.erl"},{line,428}]}]})

Crash dump is being written to: erl_crash.dump...done

Expected behavior
No crash

Affected versions
Master

Additional information
It doesn't seem to be connected to nominal types, - after changing -nominal to just -type dialyzer still crashes.

@ilya-klyuchnikov ilya-klyuchnikov added the bug Issue is reported as a bug label Dec 16, 2024
@jhogberg
Copy link
Contributor

Thanks for your report, it's a pretty silly problem, we'll have it fixed shortly. :-)

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

No branches or pull requests

3 participants