Dialyzer crashing

Anders Nygren anders.nygren@REDACTED
Thu Jul 23 20:36:42 CEST 2009


Hi
I am getting dialyzer to crash using R13B01 on Linux.
I have a function like this

-spec enc_app_cnxt/1 :: (undefined) -> (undefined); (app_cnxt()) -> (binary()).
enc_app_cnxt(undefined) ->
    undefined;
enc_app_cnxt({Name,Version}) when is_binary(Name), is_integer(Version) ->
    <<6,7,Name/binary,Version>>.

And dialyzer gives me this warning
"Type specification dial_map_params:enc_app_cnxt('undefined') ->
('undefined'); (app_cnxt()) -> (<<_:72>>)
is a subtype of the success typing:
dial_map_params:enc_app_cnxt('undefined' | {binary(),integer()}) ->
'undefined' | <<_:24,_:_*8>> "

So I changed my spec to
%-spec enc_app_cnxt/1 :: (undefined) -> (undefined); (app_cnxt()) ->
(<<_:24,_:_*8>>).

And then dialyzer crashes with

dialyzer: Analysis failed with error: {{case_clause,8},
 [{erl_types,t_form_to_string,1},
  {erl_types,t_form_to_string,1},
  {erl_types,t_form_to_string,1},
  {dialyzer_utils,get_abstract_code_from_beam,1},
  {dialyzer_succ_typings,get_warnings,6},
  {dialyzer_analysis_callgraph,analyze_callgraph,2},
  {dialyzer_analysis_callgraph,analysis_start,...},
  {dialyzer_utils,...}]}
Last messages in the log cache:
  Typesig analysis for SCC: [{yaws_soap_lib,write_hrl,3}]
  Typesig analysis for SCC: [{yaws_soap_srv,setup,2}]
  Typesig analysis for SCC: [{yaws_soap_srv,setup,3}]
  Dataflow of one SCC: [erlsom_pass2]
  Dataflow of one SCC: [erlsom_compile]
  Dataflow of one SCC: [erlsom_writeHrl,erlsom_add,erlsom]
  Dataflow of one SCC: [yaws_soap_lib]
  Dataflow of one SCC: [yaws_html]
  Dataflow of one SCC: [yaws_soap_srv]
  Dataflow of one SCC: [yaws_rpc]
  Check output file `../artifacts/glr.dialyzer' for details

/Anders


More information about the erlang-bugs mailing list