This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: minor libgcj fixes


I'm checking this in on the gcjx branch.

One of these is a patch from the trunk that fixes a java error in
libjava.  gcjx rejects this code...

The other is a runtime fix, because gcjx treats 'next' like the trunk
does, but the branch was made before this change, so if left to
itself it would crash during class registration.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault):
	Handle 'next' as version number.

2005-04-12  Aaron Luchko  <aluchko@redhat.com>

	* gnu/gcj/tools/gcj_dbtool/Main.java (addJar): Make 'length' an int.

Index: gnu/gcj/tools/gcj_dbtool/Main.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/gcj/tools/gcj_dbtool/Main.java,v
retrieving revision 1.3
diff -u -r1.3 Main.java
--- gnu/gcj/tools/gcj_dbtool/Main.java 29 Nov 2004 22:26:00 -0000 1.3
+++ gnu/gcj/tools/gcj_dbtool/Main.java 27 Apr 2005 17:47:38 -0000
@@ -245,7 +245,7 @@
 	if (classfile.getName().endsWith(".class"))
 	  {
 	    InputStream str = jar.getInputStream(classfile);
-	    long length = classfile.getSize();
+	    int length = (int) classfile.getSize();
 	    if (length == -1)
 	      throw new EOFException();
 
Index: java/lang/natClassLoader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClassLoader.cc,v
retrieving revision 1.74
diff -u -r1.74 natClassLoader.cc
--- java/lang/natClassLoader.cc 10 Jan 2005 19:39:26 -0000 1.74
+++ java/lang/natClassLoader.cc 27 Apr 2005 17:47:38 -0000
@@ -148,8 +148,9 @@
   // data references via the appropriate class loader, so the kludge
   // that required this check has gone.
   // If the class is already registered, don't re-register it.
-  jclass check_class = klass->next;
-  while (check_class != NULL)
+  for (jclass check_class = loaded_classes[hash];
+       check_class != NULL;
+       check_class = check_class->next)
     {
       if (check_class == klass)
 	{


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]