After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 52979 - Floating Point Exception
Floating Point Exception
Status: VERIFIED FIXED
Product: libxml
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-04-08 09:31 UTC by halfline
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description halfline 2001-04-08 09:31:15 UTC
My alpha seems to be picky about doing floating point division by zero.  It
will only allow it under very specific circumstances:

* When the zero is explicitly 0.0
* When it contains only numbers and no variables.

xpath.c does division by zero for the infinity and NaN vars, and it causes
a FPE.  
Patch:

--- xpath.c.orig	Sat Apr  7 23:28:53 2001
+++ xpath.c	Sat Apr  7 23:29:14 2001
@@ -164,14 +164,11 @@
 
     if (initialized) return;
 
-    xmlXPathNAN = 0;
-    xmlXPathNAN /= 0;
+    xmlXPathNAN = 0/0.0;
 
-    xmlXPathPINF = 1;
-    xmlXPathPINF /= 0;
+    xmlXPathPINF = 1/0.0;
 
-    xmlXPathNINF = -1;
-    xmlXPathNINF /= 0;
+    xmlXPathNINF = -1/0.0;
 
     initialized = 1;
 }
Comment 1 Daniel Veillard 2001-04-10 16:13:46 UTC
Okay, I have made the change, seems to work here (linux/i386),

Daniel