[Gc] Re: Problem: FPE mask reset by GC. Versions 7.X on x86_64
jean.claude.beaudoin at gmail.com
Fri Jan 21 22:25:57 PST 2011
Ivan Maidanski wrote:
> Some notes about the patch:
> 1. LINUX macro should be tested instead if linux;
Sure. I kicked that patch out your way a bit too quickly it seems.
I did not think enough beyond my own working context when I did it.
It probably is not suitable for general/portable use.
> 2. IFAIK this requires -lm linker option (alternatively we could load it dynamically to avoid possible changes of makefiles of the client applications) ;
Yes it does require -lm since fegetexcept() and feenableexcept() are both in that library.
The alternative would be inline assembly and I am not fluent enough in that to cook it up
quickly. On top of it my app links -lm anyway. But you are right to consider this a problem
in a more general context.
> 3. These functions are available only starting from some Glib version (the corresponding macro should be tested).
The man page seems to indicate that they started their career with Glibc 2.2 which is somewhat
ancient from my point of view. As for the macro to test that is way above my head.
> 4. Should we define _GNU_SOURCE before include fenv.h or not?
Yes, define _GNU_SOURCE as you say. My mistake, the man page says to define it and it should be,
sorry about that.
> 5. It's better to test GETCONTEXT_FPU_EXCMASK_BUG in mach_dep.c and set it in gcconfig.h (please also let me when the bug in glib will be fixed to adjust gcconfig.h then).
Sure. I will keep you posted on the evolution of my bug report but jugging from the activity on
my bugzilla entry you should not hold you breath, they sure don't seem in any rush about it...
More information about the Gc