[kaffe] CVS kaffe (guilhem): Fixed a bug in multi array creation.

Kaffe CVS cvs-commits at kaffe.org
Wed Dec 8 13:42:51 PST 2004


PatchSet 5574 
Date: 2004/12/08 21:16:45
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixed a bug in multi array creation.

	* kaffe/kaffevm/object.c
	(newMultiArrayChecked): Fixed recursion.

	* test/regression/MultiArray.java: New test by Mark Wielaard <mark at klomp.org>

	* test/regression/Makefile.am: Added MultiArray.

	* test/regression/Makefile.in: Regenerated.

Members: 
	ChangeLog:1.3120->1.3121 
	kaffe/kaffevm/object.c:1.27->1.28 
	test/regression/Makefile.am:1.89->1.90 
	test/regression/Makefile.in:1.194->1.195 
	test/regression/MultiArray.java:INITIAL->1.1 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3120 kaffe/ChangeLog:1.3121
--- kaffe/ChangeLog:1.3120	Wed Dec  8 20:55:46 2004
+++ kaffe/ChangeLog	Wed Dec  8 21:16:45 2004
@@ -1,3 +1,14 @@
+2004-12-08  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/object.c
+	(newMultiArrayChecked): Fixed recursion.
+
+	* test/regression/MultiArray.java: New test by Mark Wielaard <mark at klomp.org>
+
+	* test/regression/Makefile.am: Added MultiArray.
+
+	* test/regression/Makefile.in: Regenerated.
+	
 2004-12-08  Dalibor Topic  <robilad at kaffe.org>
 
 	* libraries/javalib/gnu/java/net/protocol/http/HTTPURLConnection.java: 
Index: kaffe/kaffe/kaffevm/object.c
diff -u kaffe/kaffe/kaffevm/object.c:1.27 kaffe/kaffe/kaffevm/object.c:1.28
--- kaffe/kaffe/kaffevm/object.c:1.27	Mon Aug  2 10:44:56 2004
+++ kaffe/kaffe/kaffevm/object.c	Wed Dec  8 21:16:50 2004
@@ -242,6 +242,7 @@
 	      return NULL;
 	  }
 	}
+      clazz = prevclazz;
       stackptr += stacksize;
       stacksize *= dims[j];
     }
Index: kaffe/test/regression/Makefile.am
diff -u kaffe/test/regression/Makefile.am:1.89 kaffe/test/regression/Makefile.am:1.90
--- kaffe/test/regression/Makefile.am:1.89	Fri Jul 30 11:07:06 2004
+++ kaffe/test/regression/Makefile.am	Wed Dec  8 21:16:51 2004
@@ -17,6 +17,7 @@
 ALWAYS_TESTS = \
 	$(SIMPLE_HEALTH_CHECK) \
 	$(TEST_COMPILER) \
+	$(TEST_ARRAYS) \
 	$(TEST_INTS_LONGS_FLOATS_DOUBLES) \
 	$(TEST_STRINGS) \
 	$(TEST_EXCEPTIONS) \
@@ -40,6 +41,10 @@
 ## Now test the compiler
 TEST_COMPILER = \
 	HelloWorldApp.java 
+
+## Test the array creation/handling.
+TEST_ARRAYS = \
+	MultiArray.java
 
 ## Test ints, longs, floats and doubles
 TEST_INTS_LONGS_FLOATS_DOUBLES = \
Index: kaffe/test/regression/Makefile.in
diff -u kaffe/test/regression/Makefile.in:1.194 kaffe/test/regression/Makefile.in:1.195
--- kaffe/test/regression/Makefile.in:1.194	Mon Dec  6 13:17:10 2004
+++ kaffe/test/regression/Makefile.in	Wed Dec  8 21:16:51 2004
@@ -358,6 +358,7 @@
 ALWAYS_TESTS = \
 	$(SIMPLE_HEALTH_CHECK) \
 	$(TEST_COMPILER) \
+	$(TEST_ARRAYS) \
 	$(TEST_INTS_LONGS_FLOATS_DOUBLES) \
 	$(TEST_STRINGS) \
 	$(TEST_EXCEPTIONS) \
@@ -379,6 +380,9 @@
 
 TEST_COMPILER = \
 	HelloWorldApp.java 
+
+TEST_ARRAYS = \
+	MultiArray.java
 
 TEST_INTS_LONGS_FLOATS_DOUBLES = \
 	TestIntLong.java \
===================================================================
Checking out kaffe/test/regression/MultiArray.java
RCS:  /home/cvs/kaffe/kaffe/test/regression/MultiArray.java,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe/test/regression/MultiArray.java	Wed Dec  8 21:42:51 2004
@@ -0,0 +1,18 @@
+/* This file has been contributed b Mark Wielaard <mark at klomp.org> */
+public class MultiArray
+{
+  static final char[] initCharArray =
+      new char[] {'\u0000', '\u0000', '\u0000', '\u0000', '\u0000',
+'\u0000'};
+  public static final char[][][][][] charArray_length =
+      new char[1][1][1][1][];
+
+  public static void main(String[] args)
+  {
+    charArray_length[0][0][0][0] = initCharArray;
+    System.out.println("Success.");
+  }
+}
+/* Expected output:
+Success.
+*/




More information about the kaffe mailing list