embedding octave - floating point exception
Marco Driusso
marcodriusso at gmail.com
Wed Mar 11 03:37:39 CDT 2009
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 <jason at acm.org>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090311/40e675c5/attachment.html
More information about the Help-octave
mailing list