[erlang-bugs] Dialyzer hanging
Garret Smith
garret.smith@REDACTED
Fri Jul 29 21:40:02 CEST 2011
Yes, the record definition should have been
-record(collection, {id, values :: [property()]}).
and yes, correcting the record definition also solved the hang problem.
-Garret Smith
On Fri, Jul 29, 2011 at 12:16 PM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20110729/317f7c79/attachment.htm>
More information about the erlang-bugs
mailing list