[erlang-bugs] system_limit: erlc passing options as atoms to erl

Richard Carlsson carlsson.richard@REDACTED
Mon Feb 10 18:30:49 CET 2014


The erlc program (erts/etc/common/erlc.c) invokes the erlang compiler as 
"erl ... -s erl_compile compile_cmdline ...", which means that the 
command line options are passed as atoms (due to -s). If an option 
string gets too long, erlc crashes with reason 'system_limit' because 
atoms cannot be longer than 255 characters.

Case in point: the erlc option -MT ... gets passed as 
{makedep_target,"..."}, where the target string is a list of one or more 
filenames, typically generated from a Makefile. If the filenames are 
long (in particular if absolute paths are used), this string can get 
longer than 255 characters.

Suggested solution: rewrite erlc (and other similar executables) to pass 
options using the -run or -eval flag instead of -s.

    /Richard



More information about the erlang-bugs mailing list