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: fix vtable layout


I'm checking this in on the gcjx branch.

This fixes a crash in vtable layout.

Tom

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

	* aot/aotclass.cc (lay_out_vtable): Check 'super' before copying
	vtable.

Index: aot/aotclass.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/aot/Attic/aotclass.cc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 aotclass.cc
--- aot/aotclass.cc 30 Jan 2005 02:27:59 -0000 1.1.2.1
+++ aot/aotclass.cc 31 Jan 2005 00:52:36 -0000
@@ -40,7 +40,8 @@
   model_class *sk = klass->get_superclass ();
   aot_class *super = sk ? factory->get_class (sk) : NULL;
 
-  vtable = super->vtable;
+  if (super)
+    vtable = super->vtable;
 
   for (AllMethodsIterator i = klass->begin_all_methods ();
        i != klass->end_all_methods ();


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