[fpc-devel] fpc and delphi applications cause floating point exceptions in other windows software :)

Marco van de Voort marcov at stack.nl
Wed Jun 11 08:33:55 CEST 2008

> Now lazarus needs icon support and the same thing: when GdkPixbuf is an 
> icon image then we have SIGFPE: division by zero at the same dll.
> Ok, I searched the internet and found this gtk issue: 
> http://bugzilla.gnome.org/show_bug.cgi?id=316645 where ppl complained 
> about borland tools which incorrectly modifies CPU flags and this cause 
> crahes in other software (in that case GIMP).

> I've made a conclusion that I have the same issue but with FPC. I 
> disabled floating point exceptions before my gdk call and I see no crash 
> and working cursors and icons.
> I'm not skilled in compilers, CPUs and FPUs and I just want to ask you 
> if it is ok?

This can break a lot of Delphi code, so preferably don't do it. Best
solution is to ask on that bugreport for references that state that
modifying FPU state isn't allowed. (and then maybne separately for several
supported OSes, *nix/OSX/Windows)

More information about the fpc-devel mailing list