[Ecls-list] [PATCH] Improve floating-point exception handling.

Alexander Gavrilov angavrilov at gmail.com
Tue Jun 2 08:27:18 UTC 2009


On Tue, Jun 2, 2009 at 11:34 AM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
>> (/ 0.0 0.0)
> #<a DIVISION-BY-ZERO>
> Broken at SI:BYTECODES.No restarts available.
> Broken at SI:BYTECODES.
>>> :q
> Top level.

This exception was probably thrown by a direct check for NaN in
ecl_make_singlefloat. The native FPE exceptions are mainly needed for
compiled and c-inline code that writes directly to floating-point
arrays.

By the way, that 'static int last_bits' in si_trap_fpe is not very
thread-safe. This value probably should be in the environment
structure, because exception configuration is independent for
different threads.

Alexander




More information about the ecl-devel mailing list