[erlang-bugs] erlang:halt bug
Martin Bjorklund
mbj@REDACTED
Tue May 20 10:36:19 CEST 2008
Hi,
Doing
erlang:halt(lists:duplicate(199,$a)).
halts the emulator just as it should. But
erlang:halt(lists:duplicate(200,$a)).
fails with badarg.
The reason of that the halt_1 bif checks if the string is longer than
199 bytes; if it is it returns badarg.
The documentation doesn't mention this at all.
IMO, the bif should truncate the string if necessary.
I noted that the code in init.erl truncates this in one case...
/martin
More information about the erlang-bugs
mailing list