help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: embedding octave - floating point exception


From: Marco Driusso
Subject: Re: embedding octave - floating point exception
Date: Wed, 11 Mar 2009 09:37:39 +0100

Thanks for the answers!
I've tried to wrap the octave interpreter entry points with those functions, something like this:
   
    fenv_t curr_env;
    feholdexcept(&curr_env);
    octave_main(argc,argv,1);
    feupdateenv(&curr_env);

Debugging with gdb, I've founded that octave_main ends correctly (in the previous case it stops when calling octave_ieee_init), but the program stops when feupdateev is called; debugging I get:

   Program received signal SIGFPE, Arithmetic exception.
   [Switching to Thread 0xb5cf96c0 (LWP 7791)]
   0xb7eb87b1 in feraiseexcept () from /lib/tls/i686/cmov/libm.so.6

Some suggestions? I'm calling feupdateenv or feholdexcept in the wrong way?
Thanks again.

Marco


2009/3/10 Jason Riedy <address@hidden>
Odds are that some other component is changing the FPU flags to induce
interrupts on exceptional behavior.  It might be worth wrapping all
interpreter entry points with C99's feholdexcept / feupdateenv when
they're available.  I have autoconf macros to check those sitting around
*somewhere*.

Jason


reply via email to

[Prev in Thread] Current Thread [Next in Thread]