This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: fix vtable layout
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 30 Jan 2005 17:52:22 -0700
- Subject: [gcjx] Patch: FYI: fix vtable layout
- Reply-to: tromey at redhat dot com
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 ();