[erlang-questions] Why does Dialyzer crash on this map?

Dave Cottlehuber dch@REDACTED
Tue Nov 25 21:29:25 CET 2014


Ivan,

EWORKS=46ORME here.

=46reeBSD 10.1,=C2=A0erlang-17.3=5F2,3 from pkg. What=E2=80=99s yours=3F

dch =C2=A0 /tmp =E2=9D=AF=E2=9D=AF=E2=9D=AF =C2=A0 dialyzer --build=5Fplt=
 --apps erts kernel stdlib =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0=E2=8F=8E
=C2=A0 Creating PLT /home/dch/.dialyzer=5Fplt ...
Unknown functions:
=C2=A0 compile:file/2
=C2=A0 compile:forms/2
=C2=A0 compile:noenv=5Fforms/2
=C2=A0 compile:output=5Fgenerated/1
=C2=A0 crypto:block=5Fdecrypt/4
=C2=A0 crypto:start/0
Unknown types:
=C2=A0 compile:option/0
=C2=A0done in 1m8.53s
done (passed successfully)
dch =C2=A0 /tmp =E2=9D=AF=E2=9D=AF=E2=9D=AFdialyzer ltu.erl
=C2=A0 Checking whether the PLT /home/dch/.dialyzer=5Fplt is up-to-date..=
. yes
=C2=A0 Proceeding with analysis... done in 0m0.41s
done (passed successfully)
dch =C2=A0 /tmp =E2=9D=AF=E2=9D=AF=E2=9D=AFerl
Erlang/OTP 17 =5Berts-6.2=5D =5Bsource=5D =5B64-bit=5D =5Bsmp:8:8=5D =5Ba=
sync-threads:64=5D =5Bkernel-poll:true=5D

Eshell V6.2 =C2=A0(abort with =5EG)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
=C2=A0 =C2=A0 =C2=A0 =C2=A0(v)ersion (k)ill (D)b-tables (d)istribution
a
dch =C2=A0 /tmp =E2=9D=AF=E2=9D=AF=E2=9D=AF

A+, Dave
=E2=80=94 sent from my Couch

-----Original Message-----
=46rom:=C2=A0Ivan Uemlianin <ivan=40llaisdy.com>
Reply:=C2=A0Ivan Uemlianin <ivan=40llaisdy.com>>
Date:=C2=A025. November 2014 at 18:21:02
To:=C2=A0erlang-questions=40erlang.org <erlang-questions=40erlang.org>>
Subject:=C2=A0 Re: =5Berlang-questions=5D Why does Dialyzer crash on this=
 map=3F

> Dear All
> =20
> Quick update:
> =20
> Just tried this at home on my Mac, and Dialyzer Dialyzes ltu.erl with n=
o
> problem.
> =20
> The work machine that displayed the error below is a =46reeBSD machine.=

> Both machines run the same version of Dialyzer (2.7.2); both obvs have =
a
> 17.x erlang but the BSD might be a bit older.
> =20
> Have any minor bugs in Dialyzer been ironed out recently=3F
> =20
> Thanks
> =20
> Ivan
> =20
> =20
> On 25/11/2014 15:13, Ivan Uemlianin wrote:
> > Dear All
> >
> > Running Dialyzer on the module below crashes Dialyzer with the error
> > following:
> >
> > ** module
> >
> > -module(ltu).
> > -export(=5Bget=5Fmap/0=5D).
> >
> > -spec get=5Fmap() -> map().
> > get=5Fmap() ->
> > =23=7Blabels =3D> =5Bone, two=5D,
> > number =3D> 27,
> > =5B1,2,3=5D =3D> wer, %% ok
> > =7B4,5,6=7D =3D> sdf, %% ok
> > kvok =3D> =23=7B
> > a =3D> qwe,
> > 2 =3D> asd,
> > =5B1,2,3=5D =3D> wer, %% bad
> > =7B4,5,6=7D =3D> sdf, %% bad
> > =22abc=22 =3D> zxc
> > =7D
> > =7D.
> >
> > ** crash
> >
> > =24 dialyzer ltu.erl
> > Checking whether the PLT /home/ivan/.dialyzer=5Fplt is
> > up-to-date... yes
> > Proceeding with analysis...
> > =3DERROR REPORT=3D=3D=3D=3D 25-Nov-2014::14:52:50 =3D=3D=3D
> > Error in process <0.45.0> with exit value:
> > =7B=7Bcase=5Fclause,map=7D,=5B=7Bdialyzer=5Fdataflow,find=5Fterminals=
,1,=5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,3451=7D=5D=7D,=7Bd=
ialyzer=5Fdataflow,find=5Fterminals=5Flist,3,=5B=7Bfile,=22dialyzer=5Fdat=
aflow.erl=22=7D,=7Bline,3504=7D=5D=7D,=7Bdialyzer=5Fdataflow,classify=5Fr=
eturns... =20
> >
> >
> >
> > dialyzer: Analysis failed with error:
> > =7B=7Bcase=5Fclause,map=7D,
> > =5B=7Bdialyzer=5Fdataflow,find=5Fterminals,1,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,3451=7D=5D=7D,
> > =7Bdialyzer=5Fdataflow,find=5Fterminals=5Flist,3,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,3504=7D=5D=7D,
> > =7Bdialyzer=5Fdataflow,classify=5Freturns,1,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,3443=7D=5D=7D,
> > =7Bdialyzer=5Fdataflow,'-state=5F=5Fget=5Fwarnings/2-fun-0-',7,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,2908=7D=5D=7D,
> > =7Blists,foldl,3,=5B=7Bfile,=22lists.erl=22=7D,=7Bline,1261=7D=5D=7D,=

> > =7Bdialyzer=5Fdataflow,state=5F=5Fget=5Fwarnings,2,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,2934=7D=5D=7D,
> > =7Bdialyzer=5Fdataflow,get=5Fwarnings,5,
> > =5B=7Bfile,=22dialyzer=5Fdataflow.erl=22=7D,=7Bline,142=7D=5D=7D,
> > =7Bdialyzer=5Fsucc=5Ftypings,collect=5Fwarnings,2,
> > =5B=7Bfile,=22dialyzer=5Fsucc=5Ftypings.erl=22=7D,=7Bline,182=7D=5D=7D=
=5D=7D
> > Last messages in the log cache:
> > Reading files and computing callgraph... done in 0.07 secs
> > Removing edges... done in 0.00 secs
> >
> > If I comment out the two lines marked =22%% bad=22, Dialyzer can chec=
k the
> > module. nb the same key-value pairs that are bad in the nested map
> > kvok, are ok in the top-level map.
> >
> > Is this supposed to happen=3F If so, why=3F
> >
> > With thanks and best wishes
> >
> > Ivan
> >
> >
> =20
> --
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Ivan A. Uemlianin PhD
> Llaisdy
> Speech Technology Research and Development
> =20
> ivan=40llaisdy.com
> =40llaisdy
> llaisdy.wordpress.com
> github.com/llaisdy
> www.linkedin.com/in/ivanuemlianin
> =20
> festina lente
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =20
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> erlang-questions mailing list
> erlang-questions=40erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
> =20

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 101 bytes
Desc: Message signed with OpenPGP using AMPGpg
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141125/6c153bcb/attachment.bin>


More information about the erlang-questions mailing list