[xml] [BUG] FPE on RedHat 7.0 Alpha



My alpha has trouble grokking division by zero of floats, which is
done in xpath.c to represent divergent numbers.  It seems silly, but
the box will only do it the denominator is 0.0 (Using 0, and expecting
an implicit cast won't work), and no variables can be in the
expresion.  I have no idea why these things are true (I think it has
something to do with registers or something), but it seems to be so. 
I have filed a report on bugzilla (bug 52979).  Below is a patch to
make xpath.c do what the Alpha likes.

--
halfline (Ray Strode)

--- 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;
 }






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