[erlang-bugs] nocatch error in dialyzer, R14A

Kostis Sagonas kostis@REDACTED
Tue Aug 31 16:00:28 CEST 2010


Nico Kruber wrote:
> On Tuesday 31 August 2010 14:59:02 Nico Kruber wrote:
>> While I was trying to make a minimal example for another strange behaviour
>> of the dialyzer I found the following bug calling
>>
>>> dialyzer -Werror_handling -Wrace_conditions --src -c rec*.erl --no_native
>> with the attached files in the current directory:
>>
>>   Checking whether the PLT /home/nico/.dialyzer_plt is up-to-date... yes
>>   Proceeding with analysis...
>> =ERROR REPORT==== 31-Aug-2010::14:53:04 ===
>> Error in process <0.29.0> with exit value: {{nocatch,{error,
>> [73,108,108,101,103,97,108,32,100,101,99,108,97,114,97,116,105,111,110,32,1
>> 11,102,32,"rec2",35,123,"id",125,10]}},
>> [{erl_types,record_from_form,5},{erl_types,t_from_form,3},{erl_types,'-
>> t_opaque_from_records/1-anonymous-2-',3},{dict,map_bucket,2},
>> {dict,map_bkt_list,2},{dict...
>>
>>
>> dialyzer: Analysis failed with error: {{nocatch,{error,
>> [73,108,108,101,103,97|...]}},
>>  [{erl_types,record_from_form,5},
>>   {erl_types,t_from_form,3},
>>   {erl_types,'-t_opaque_from_records/1-anonymous-2-',3},
>>   {dict,map_bucket,2},
>>   {dict,map_bkt_list,2},
>>   {dict,map_bkt_list,2},
>>   {dict,map_seg_list,...},
>>   {dict,...}]}
>> Last messages in the log cache:
>>   Reading files and computing callgraph... done in 0.06 secs
>>   Removing edges... done in 0.01 secs
>>   Typesig analysis for SCC: [{rec2,module_info,1}]
> 
> I forgot to mention that if you replace opaque with type in rec2.erl, it works

Same issue here with the other one.  Simply change the declaration:

-record(rec2, {id :: rec1:rec1()}).
-opaque(rec2() :: #rec2{id :: rec1:rec1()}).

to the equivalent ones:

-record(rec2, {id :: rec1:rec1()}).
-opaque(rec2() :: #rec2{}).

and the crash will go away.

Kostis


More information about the erlang-bugs mailing list