Patch: RFA: Fix for PR java/17216
Andrew Haley
aph@redhat.com
Wed Sep 15 12:57:00 GMT 2004
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.
More information about the Java-patches
mailing list