Name: ddT132432 Date: 09/14/2001
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
The environment is SuSE Linux 7.1 for x86 with Kernel 2.4.0.
With JDK1.3.1 under Linux, if you try to read a not fully initialized 2D-array
(one dimension being initialized and the other not), you get a Segmentation
fault instead of a NullPointerException.
Compile and run the following testcase:
---------------------------------------
import java.lang.*;
public class Test
{
public static void main(String[] args)
{
try
{
int[][] array = new int[8][] ;
int i = array[0][0] ;
} catch (NullPointerException exc)
{
System.out.println("Exception catched") ;
}
}
}
------------------------------------
if you run it with JDK 1.3.1, you get the segmentation fault.
If you start with the option -classic, it works as expected
(NullPointerException)
Note: it works fine with JDK 1.3.0 or JDK 1.4 beta
The bug happens as soon as you try to parse an XML document with Apache's
xerces parser.
Any software using Xerces to parse an XML Document crashes here!
The same problem was already reported under 4459978 which has been closed for
some obscure reasons. I've tracked down the problem in the xerces code and
found out it happened because xerces use some code like the test case above.
Hopefully you'll be able to fix it with this simplify testcase...
(Review ID: 131601)
======================================================================