This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: ClassLoader: unexpected exception during linking
- From: Tom Tromey <tromey at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: Per Bothner <per at bothner dot com>, <java at gcc dot gnu dot org>
- Date: 04 Dec 2002 18:35:33 -0700
- Subject: Re: ClassLoader: unexpected exception during linking
- References: <Pine.LNX.4.44.0212031448440.24066-100000@ops2.one-point.com>
- Reply-to: tromey at redhat dot com
>>>>> "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());
}
}