ClassLoader: unexpected exception during linking

Tom Tromey tromey@redhat.com
Wed Dec 4 17:37:00 GMT 2002


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

Jeff> Yesterday I found that isVirtualMethod fails to consider final
Jeff> methods.
Good catch, thanks.
Jeff> - if (!isVirtualMethod(meth))
Jeff> + if (meth->index == (_Jv_ushort)0xffff)
This patch causes the appended program to hang with `gij'.
I think the fix is to change _Jv_LayoutVTableMethods to check for
final methods (that don't override a method in the superclass) when
constructing the vtable. I'm testing it now.
Tom
class x
{
 public int x1 () { return 3; }
}
public class t extends x
{
 public final int x1() { return 5; }
 public final int x2() { return 7; }
 public static void main(String[] args)
 {
 t z = new t();
 System.out.println(z.x1());
 System.out.println(z.x2());
 }
}


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /