[erlang-questions] picky dialyzer

Björn Gustavsson <>
Tue Jan 18 08:36:52 CET 2011


2011/1/14 Kostis Sagonas <>:

> You are right. Apparently, enabling HiPE causes the loader to crash
> miserably when one tries to load a function with 256 arguments.
> This is very surprising, because no native code is involved.

The crash is in hipe_unified_loader. It crashes the code_server
process before it has found out that there is no native code
to load.

> I can of course investigate and possibly correct this throughout but I am
> also wondering: is this 0..256 a sane choice? Why on earth one would have
> such a range? Wasn't Erlang exotic enough without this feature? :-)

The 0..256 range was an arbitrary choice decided long before
there was a Dialyzer.

Actually, I am willing to change the range to 0..255 in the next
release in order to keep the Dialyzer type simple and beautiful.
I don't think that there is any code depending on a function
having 256 arguments, so that change should be safe.

> PS. I still do not like:
>
>        erlc f_257.erl
>
>    Happily succeeding and generating a bogus file.
>

The loader will refuse to load the file, so it will not
crash the emulator. But I'll try to add the check to
the compiler in the next release.

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-bugs mailing list