[erlang-bugs] R16B02: Dialyzer consumes too much, if not infinite, amount of memory for some apps

Kostis Sagonas <>
Sat Nov 16 11:22:07 CET 2013

On 11/15/2013 10:46 AM, Masatake Daimon wrote:
> I'm using R16B02 on 64-bit Linux. When building PLT, Dialyzer consumes
> too much memory that even reaches to 1.5 GiB for some applications:
>> % (ulimit -v 1572864; dialyzer --build_plt --output_plt
>> syntax_tools.plt --statistics --apps syntax_tools)
>>   Creating PLT syntax_tools.plt ...
>>     compile    (+0.02s):   1.10s (   9 modules)
>>     clean      (+0.00s):   0.02s
>>     remote     (+0.05s):   1.56s
>>     order      (+0.01s):   0.06s
>>     typesig    (+0.00s):
>> Crash dump was written to: erl_crash.dump
>> eheap_alloc: Cannot allocate 123210440 bytes of memory (of type "heap").
> .... <SNIP>
> So I suspected either erl_types:t_has_var/1 or erl_types:t_limit_k/2 (or
> both) are entering into an infinite recursion but I couldn't find a
> small example code to reproduce the problem. Any ideas?

As far as I know, the functions you mention (or any other functions in 
Dialyzer for that matter) are not entering an infinite loop.

It's true that for the analysis of modules that contain deeply recursive 
types, such as those in syntax_tools, Dialyzer needs some GBs to run (*) 
but I think that this should not really be a problem in any reasonable 
machine that one can buy these days. Sorry but Dialyzer was never meant 
to run on Raspberry Pis.


(*) I was curious so I tried to see how much memory is needed: To build 
a PLT for syntax_tools you need approx. 1.7GBs on 32-bit machines and 
3.1GBs on 64-bit machines.

More information about the erlang-bugs mailing list