[erlang-bugs] Dialyzer hanging

Tuncer Ayaz tuncer.ayaz@REDACTED
Fri Jul 29 21:16:13 CEST 2011


On Fri, Jul 29, 2011 at 3:30 AM, Garret Smith wrote:
> I created a small code example, distilled from a couple files in a
> larger project, that will cause dialyzer to hang indefinitely.
> At least, in the larger project I left dialyzer running for 42 hours
> before giving up.  I have only left it running for a few minutes on
> this small code example before deciding that more time would not help.
>
> I am running R14B03 on FreeBSD, amd64 architecture:
> Erlang R14B03 (erts-5.8.4) [source] [64-bit] [smp:6:6] [rq:6]
> [async-threads:0] [hipe] [kernel-poll:false]
>
> Steps to reproduce:
> erlc +debug_info test.erl
> dialyzer --build_plt --output_plt test.plt test.beam
>
> test.erl:
> -module(test).
>
> -compile(export_all).
>
>
> -record(property, {name, value}).
> -opaque property() :: #property{}.
>
> -record(collection, {id, values :: [#property{}]}).
>
> as_proplist(#collection{values = Values}) ->
>         [{Name, Value} || #property{name = Name, value = Value} <- Values] .
>
> If I can provide any more details that will help, please let me know!

Are you sure the record definition
-record(collection, {id, values :: [#property{}]}).
is correct and wasn't meant to be
-record(collection, {id, values :: [property()]}).
or
-record(collection, {id, values :: list(property())}).
?

Only the first definition triggers a hang.



More information about the erlang-bugs mailing list