This is the mail archive of the mailing list for the GCC 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]

[ecj] Patch: FYI: fix runtime crash

I'm checking this in on the gcj-eclipse branch.

This fixes a runtime crash.  When I rewrote is_compiled_class I
removed this check.  It turns out that without this check we will
silently miscompile class files with -findirect-dispatch in some
situations -- we'll emit them as if their superclass was Object.

This fixes many, but not all, of the execution tests from the test


Index: ChangeLog
from  Tom Tromey  <>

	* class.c (is_compiled_class): Explicitly check for current

Index: class.c
--- class.c	(revision 114451)
+++ class.c	(working copy)
@@ -2074,6 +2074,10 @@
     return 1;
   if (TYPE_ARRAY_P (class))
     return 0;
+  /* We have to check this explicitly to avoid trying to load a class
+     that we're currently parsing.  */
+  if (class == current_class)
+    return 2;
   seen_in_zip = (TYPE_JCF (class) && JCF_SEEN_IN_ZIP (TYPE_JCF (class)));

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