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: RFA: Fix for PR java/17216


Tom Tromey writes:
 > This fixes PR java/17216.
 > 
 > `javac -target 1.1' will emit redeclarations of Miranda methods in the
 > abstract class where they enter the concrete class hierarchy.  These
 > redeclarations are marked Synthetic.
 > 
 > In the test case in the PR, the subclass implements the method, so the
 > search in layout_class_method finds an overridden method.  However,
 > synthetic (DECL_ARTIFICIAL) methods aren't included in the vtable
 > layout; so we see a crash because the overriding method in the
 > subclass ends up with a NULL vtable index.
 > 
 > I don't see why DECL_ARTIFICIAL methods should be omitted from the
 > vtable.  Is there a reason?  Removing this doesn't seem to cause any
 > problems.

DECL_ARTIFICIAL is used for JNI stubs and methods marked "Synthetic".
I can't see any good reason that synthetic methods were ever ommitted
from vtables except to save space.

Your patch seems OK.  Please check it in.

Andrew.


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