[erlang-bugs] io_lib format infinite loop
Anthony Ramine
n.oxyde@REDACTED
Tue May 20 16:23:29 CEST 2014
Bug is in io_lib_format:term/5 when {4,2,3} = {lists:flatlength(T),F,P0}.
--
Anthony Ramine
Le 20 mai 2014 à 14:50, Richard Carlsson <carlsson.richard@REDACTED> a écrit :
> Here's a fun one:
>
> 1> io:format("~3.3w",[3.14]).
> ***ok
> 2> io:format("~2.3w",[3.14]).
>
> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
> (v)ersion (k)ill (D)b-tables (d)istribution
> ^C
>
> And this would be bad to run on a production machine:
>
> 1> error_logger:format("~3.3w",[3.14]).
> ok
> =ERROR REPORT==== 20-May-2014::14:38:25 ===
> ***
> 2> error_logger:format("~2.3w",[3.14]).
> ok
> 3>
>
> (since the formatting is performed by the receiving io server process, the shell remains useful in this case, but the logger becomes locked in an infinite loop consuming all available memory).
>
> /Richard
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
More information about the erlang-bugs
mailing list