[erlang-bugs] Dialyzer v2.2.0 crash

Peer Stritzinger peerst@REDACTED
Sun May 1 13:22:50 CEST 2011


When running dialyzer like:

    $ dialyzer --src -c codec_can.erl

on the file codec_can.erl with the following contents (minimal code
snippet that shows the error):

    -module(codec_can).
    -compile(export_all).

    -record(can_pkt, {id, data, timestamp}).

    -spec recv(<<_:64,_:_*8>>,fun((_) -> any()),atom() | pid() |
{atom(),_}) -> any().
    recv(Packet, Recv_fun, Chan) ->
        P = decode(Packet),
        #can_pkt{id=Can_id, data=Can_data}=P,
        Recv_fun(P).

    -spec decode(<<_:64,_:_*8>>) ->
#can_pkt{id::<<_:11>>,data::binary(),timestamp::char()}.
    decode(<<_:12, Len:4, Timestamp:16,
             0:3, Id:11/bitstring, 0:18,
             Data:Len/binary, _/binary>>) ->
        #can_pkt{id=Id, data=Data, timestamp=Timestamp}.

I get the following error:

    $ dialyzer --src -c codec_can.erl
      Checking whether the PLT /home/peer/.dialyzer_plt is up-to-date... yes
      Proceeding with analysis...
    =ERROR REPORT==== 1-May-2011::13:08:13 ===
    Error in process <0.30.0> with exit value:
{{case_clause,8},[{erl_types,t_form_to_string,1},{erl_types,t_form_to_string,1},{dialyzer_contracts,contract_to_string_1,1},{dialyzer_contracts,extra_contract_warning,6},{dialyzer_contracts,picky_contract_check...


    dialyzer: Analysis failed with error: {{case_clause,8},
     [{erl_types,t_form_to_string,1},
      {erl_types,t_form_to_string,1},
      {dialyzer_contracts,contract_to_string_1,1},
      {dialyzer_contracts,extra_contract_warning,6},
      {dialyzer_contracts,picky_contract_check,7},
      {dialyzer_contracts,get_invalid_contract_warnings_funs,4},
      {dialyzer_contracts,get_invalid_contract_warnings_modules,...},
      {dialyzer_succ_typings,...}]}
    Last messages in the log cache:
      Reading files and computing callgraph... done in 0.27 secs
      Removing edges... done in 0.01 secs
      Typesig analysis for SCC: [{codec_can,module_info,1}]
      Typesig analysis for SCC: [{codec_can,decode,1}]
      Typesig analysis for SCC: [{codec_can,module_info,0}]
      Typesig analysis for SCC: [{codec_can,recv,3}]
      Dataflow of one SCC: [codec_can]

I'm using dialyzer v2.2.0 from Erlang R13B04 (erts-5.7.5) [source]
[smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

I get  a similar error in another file, I can try to reduce this file
also and post it if it helps.

Regards,
Peer Stritzinger



More information about the erlang-bugs mailing list