BZ #116: Segfault when creating multidimensional arry via reflection on OpenJDK

Status fields:

creation_ts:2008-12-12 18:16
When instantiating a new multidimensional array (more than 1 dimension) via reflection,
the VM segfaults. Note that this only happens with OpenJDK. This can be easily
reproduced by invoking the following:

java.lang.reflect.Array.newInstance(Foo.class, new int {23, 42})

The problem is, that JVM_NewMultiArray does not create the proper array class. I am
going to write a regression test for this one and fix it with the array access classes.

Comment #1 by on 2008-12-12 18:43:55

As promised I added a regression test. Note that the test only checks some simple
assertions and can not serve as a full test of JVM_NewMultiArray, but it clearly detects
the segfault. Here is the test:

Comment #2 by on 2008-12-15 22:20:49

This fixes the problem: