[erlang-questions] R11B-3 shell crashes when printing float infinity
Mikael Pettersson
mikpe@REDACTED
Mon Apr 2 09:00:07 CEST 2007
On Sun, 1 Apr 2007 18:44:24 -0700, Bob Ippolito wrote:
> I haven't installed R11B-4 on my workstation yet, so I'm not sure if
> this is still applicable... but I just noticed that the R11B-3 shell
> crashes if you try and get it to print out float infinity.
>
> Erlang (BEAM) emulator version 5.5.3 [source] [async-threads:0]
> [kernel-poll:false]
>
> Eshell V5.5.3 (abort with ^G)
> 1> float_to_list(1.0e666666).
> "inf"
> 2> 1.0e666666.
> *** ERROR: Shell process terminated! (^G to start new job) ***
>
> =ERROR REPORT==== 1-Apr-2007::18:41:54 ===
> Error in process <0.23.0> with exit value:
> {function_clause,[{io_lib_format,float_data,[[],[]]},{io_lib_format,fwrite_e,5},{shell,shell_rep,4},{shell,server_loop,7}]}
Your system is broken. Erlang doesn't allow infinities or NaNs.
In a working system, the expression "1.0e666666" is supposed to
be rejected by the parser (and it is in my system).
Please try R11B-4 first. If the invalid float constant still
is accepted, file a bug report. Useful information would be
which CPU, OS and C compiler you're using, and whether ./configure
identified "reliable floating-point exceptions" or not.
/Mikael
More information about the erlang-questions
mailing list