This is the mail archive of the java@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]

Re: ClassLoader: unexpected exception during linking


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


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