[kaffe] weird GC error with bad class format

Timothy Stack stack@cs.utah.edu
Mon Feb 3 13:44:01 2003


--%--multipart-mixed-boundary-1.86039.1044308705--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

> Could you post a small patch?

attached

> cheers,
> dalibor topic

tim

--%--multipart-mixed-boundary-1.86039.1044308705--%
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Description: ASCII C++ program text
Content-Disposition: attachment; filename="scl.diff"

Index: libraries/clib/native/SystemClassLoader.c
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/clib/native/SystemClassLoader.c,v
retrieving revision 1.6
diff -u -r1.6 SystemClassLoader.c
--- libraries/clib/native/SystemClassLoader.c	29 Jul 2002 14:52:13 -0000	1.6
+++ libraries/clib/native/SystemClassLoader.c	3 Feb 2003 21:43:04 -0000
@@ -78,7 +78,8 @@
 		 * upgrade error to an exception if *this* class wasn't found.
 		 * See discussion in Class.forName()
 		 */
-		if (!strcmp(info.classname, "java.lang.NoClassDefFoundError")) {
+		if ((info.type & KERR_EXCEPTION)
+		    && !strcmp(info.classname, "java.lang.NoClassDefFoundError")) {
 			/*
 			 * However, we don't upgrade if it is a second attempt
 			 * to load a class whose loading has already failed.
@@ -105,11 +106,6 @@
 						     "%s", info.mess);
 				discardErrorInfo(&info_tmp);
 			}
-		}
-		else if ((info.type & KERR_EXCEPTION)
-			 && !strcmp(info.classname, "java.lang.NoClassDefFoundError"))
-                {
-
 		}
 
 		if (name != buffer) {

--%--multipart-mixed-boundary-1.86039.1044308705--%--