JDK-5032314 : problem affecting xalan 2.4.1 as supplied with jdk 1.4.2
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 1.4.2_04
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2004-04-15
  • Updated: 2012-04-25
  • Resolved: 2004-05-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
1.4.2_05 05Fixed
Problem as described by the customer.

This is a generic problem affecting xalan 2.4.1 as supplied with jdk 1.4.2.
In the apache source file XStringForFSB.java the method toDouble() at the
end of the file contains an algorithmic error. Specifically, if the input
String value conyains more than about 18 digits then the intermediate long
values used internally by the algorithm will overflow and the final double
value that is calculated will be wrong.

I attach a couple of small files (an xml file and an xsl file)that
illustrate this problem. 

Run as follows : java org.apache.xalan.xslt.Process -Q -IN elements.xml -XSL

And observe that the output value for the "atomic weight" of helium is
completely wrong.

We observed this while comparing the output data from a real production
system that has been running successfully on Solaris using JDK 1.4 with the
output from a Linux system running JDK 1.4.2. The Solaris/1.4 system worked
perfectly, but the Linux/1.4.2 system had incorrect values in the output
file. Note that this is not a linux problem, it's a bug in the xalan
implementation and it's generic.

Apache fixed this quite some time ago but the fix is not in the 2.4.1 code

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_05 generic FIXED IN: 1.4.2_05 INTEGRATED IN: 1.4.2_05

EVALUATION Changed the implementation of toDouble() to same as in 1.5 workspace. ###@###.### 2004-04-29