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]

Patch: RFC: re-enable duplicate class registration error


The duplicate class registration error was optimistically disabled
on the trunk.  What this means in practice is that a duplicate class
registration results in a libgcj hang.

I think it is friendlier to get the error.  I propose we re-enable it
as appended.  Comments?


I regularly get duplicate registration problems whenever I fail to set
library_control=never.  Our current setup is pretty unfriendly if you
want to have multiple versions of libgcj installed at once.  Two
months ago would have been a good time to solve this :-(

Tom

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

	* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault):
	Re-enable duplicate class registration error.

Index: java/lang/natClassLoader.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natClassLoader.cc,v
retrieving revision 1.72
diff -u -r1.72 natClassLoader.cc
--- java/lang/natClassLoader.cc 25 Nov 2004 03:47:04 -0000 1.72
+++ java/lang/natClassLoader.cc 7 Dec 2004 20:22:30 -0000
@@ -201,8 +201,8 @@
   // The BC ABI makes this check unnecessary: we always resolve all
   // data references via the appropriate class loader, so the kludge
   // that required this check has gone.
-#if 0
   // If the class is already registered, don't re-register it.
+  jclass check_class = klass->next;
   while (check_class != NULL)
     {
       if (check_class == klass)
@@ -227,7 +227,6 @@
 
       check_class = check_class->next;
     }
-#endif
 
   // FIXME: this is really bogus!
   if (! klass->engine)


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