[erlang-bugs] Dialyzer PLT update takes too much memory
Wed Jan 30 17:53:05 CET 2013
On 01/30/2013 05:33 PM, Loïc Hoguin wrote:
> Going from R15B03 to R16A and trying to dialyze has Dialyzer complains
> about the outdated PLT. So far so good. Problem is Dialyzer never
> manages to update said PLT due to an excessive amount of memory use.
> With 2GB of free memory the following command fails when the PLT is
> dialyzer --src src --plt .cowboy.plt --no_native -Werror_handling
> -Wrace_conditions -Wunmatched_returns
> The following output is observed:
> Checking whether the PLT .cowboy.plt is up-to-date... no
> (the PLT .cowboy.plt was built with an old version of Dialyzer)
> Rebuilding the information in .cowboy.plt...
> Crash dump was written to: erl_crash.dump
> eheap_alloc: Cannot allocate 762886488 bytes of memory (of type "heap").
> make: *** [dialyze] Aborted (core dumped)
> The crash dump is a mighty 102MB.
> Building the PLT from scratch works.
You cannot expect the update to work. In R16* there have been major
changes related to where the type information of BIFs is located: before
most of it was hardcoded in erl_bif_types while now it appears in the
corresponding files (e.g. erlang.erl). I am not sure whether this is the
culprit or not, but I can understand that changes like this one cause
I suggest that you always build the PLT from scratch in each new version
which, as you mention, works.
More information about the erlang-bugs