[erlang-bugs] Dialyzer can't compile map correctly

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue Dec 16 01:09:10 CET 2014


Oh, I forgot this important information:

This fails with a build of OTP 17.3.4 and 17.4, compiled with
--enable-dirty-schedulers --disable-hipe


On Tue, Dec 16, 2014 at 1:07 AM, Jesper Louis Andersen <
jesper.louis.andersen@REDACTED> wrote:
>
> Hi OTP team and other interested parties.
>
> While I was building up the enacl application, I have discovered a problem
> where I can crash the dialyzer. Attached are two minimized files which
> exposes the problem. To compile this I did:
>
> erlc +debug_info *.erl
> dialyzer --build_plt --apps kernel stdlib
> dialyzer *.beam
>
> and it produces the following IDE (Internal Dialyzer Error):
>
> erlc +debug_info *.erl
> dialyzer *.beam
>   Checking whether the PLT /home/jlouis/.dialyzer_plt is up-to-date... yes
>   Proceeding with analysis...
> =ERROR REPORT==== 16-Dec-2014::01:00:27 ===
> Error in process <0.48.0> with exit value:
> {{case_clause,map},[{dialyzer_dataflow,find_terminals,1,[{file,"dialyzer_dataflow.erl"},{line,3451}]},{dialyzer_dataflow,find_terminals_list,3,[{file,"dialyzer_dataflow.erl"},{line,3504}]},{dialyzer_dataflow,classify_returns...
>
>
> dialyzer: Analysis failed with error:
> {{case_clause,map},
>  [{dialyzer_dataflow,find_terminals,1,
>                      [{file,"dialyzer_dataflow.erl"},{line,3451}]},
>   {dialyzer_dataflow,find_terminals_list,3,
>                      [{file,"dialyzer_dataflow.erl"},{line,3504}]},
>   {dialyzer_dataflow,classify_returns,1,
>                      [{file,"dialyzer_dataflow.erl"},{line,3443}]},
>   {dialyzer_dataflow,'-state__get_warnings/2-fun-0-',7,
>                      [{file,"dialyzer_dataflow.erl"},{line,2908}]},
>   {lists,foldl,3,[{file,"lists.erl"},{line,1261}]},
>   {dialyzer_dataflow,state__get_warnings,2,
>                      [{file,"dialyzer_dataflow.erl"},{line,2934}]},
>   {dialyzer_dataflow,get_warnings,5,
>                      [{file,"dialyzer_dataflow.erl"},{line,142}]},
>   {dialyzer_succ_typings,collect_warnings,2,
>                          [{file,"dialyzer_succ_typings.erl"},{line,182}]}]}
> Last messages in the log cache:
>   Reading files and computing callgraph... done in 0.06 secs
>   Removing edges... done in 0.01 secs
> Makefile:2: recipe for target 'all' failed
> make: *** [all] Error 1
>
> I have attached the two culprit files. They have the following sizes:
>
> jlouis@REDACTED:~/tmp/problem$ wc *.erl
>  12  29 211 enacl.erl
>  23  36 460 enacl_nif.erl
>  35  65 671 total
>
> and I think it may be possible to shrink further down, but I think it is
> already small enough to be workable. Do note: while one part is a NIF, you
> don't need the underlying C code to break the dialyzer.
>
> The full repository is at:
>
> https://github.com/jlouis/enacl
>
> and the commit ID 23e535fcc23c1 should have the error if you want to look
> at the full repository. It does require a properly installed libsodium,
> which is not in Debian/Ubuntu for instance, which is why I have tried to
> narrow down the problem before reporting it.
>
> I hope this is enough to track down the error, perhaps by looking at the
> backtrace and error case alone. Otherwise, please come back to me.
>
> --
> J.
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141216/26e08bfd/attachment.htm>


More information about the erlang-bugs mailing list