[erlang-questions] Segfault on floating point error
Tue Jun 30 11:14:56 CEST 2009
Peter A. Smirnoff writes:
> Hi there !
> I have Erlang 5.6.5 installation on Slackware 9.0.
> Im trying to do simple thing : divide by zero in erlang shell. Node crashes. The session:
> # erl
> Erlang(BEAM) emulator version 5.6.5 [source] [async-threads:0] [hipe]
> Eshell V5.6.6
> 1> 1/0.
> Segmentation fault
> What's wrong?
Works on e.g. Fedora:
Erlang R13B01 (erts-5.7.2) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.7.2 (abort with ^G)
** exception error: bad argument in an arithmetic expression
in operator '/'/2
called as 1 / 0
Apparently your system pretends (as far as erts/configure.in is concerned)
to support FP exceptions, but something in it breaks on FP exceptions in
the actual BEAM VM.
Unless you're willing to do some low-level debugging with gdb, you should
rebuild it from scratch with --disable-hipe --disable-fp-exceptions.
More information about the erlang-questions