Re: io_lib format infinite loop
Anthony Ramine <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <[email protected]> |
Found a fix, will submit it later with a test. -- Anthony Ramine Le 20 mai 2014 à 16:23, Anthony Ramine <[email protected]> a écrit : > 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 <[email protected]> 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 >> [email protected] >> http://erlang.org/mailman/listinfo/erlang-bugs > _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs