ClassLoader: unexpected exception during linking

Tom Tromey
Wed Dec 4 17:37:00 GMT 2002

>>>>> "Jeff" == Jeff Sturm <> 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.


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();

More information about the Java mailing list