This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFC/RFT] Patch (java): Switch to new verifier
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: tromey at redhat dot com
- Cc: java-patches at gcc dot gnu dot org, Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 5 Mar 2005 17:56:25 +0530
- Subject: Re: [RFC/RFT] Patch (java): Switch to new verifier
- References: <4222166D.2060207@gmail.com> <cvueq6$gr2$1@sea.gmane.org> <m34qfrz64m.fsf@localhost.localdomain>
- Reply-to: Ranjit Mathew <rmathew at gmail dot com>
On 04 Mar 2005 10:13:29 -0700, Tom Tromey <tromey@redhat.com> wrote:
> Ranjit> If I compile this to a class file and then use
> Ranjit> "-O3 -findirect-dispatch" (to trigger the new verifier
> Ranjit> without this patch), I get to see the bug.
>
> I can't reproduce this here:
Which is weird, since I still can:
-------------------------------- 8< --------------------------------
~/tmp > cat Foo.java
public class Foo
{
static int bar( )
{
int[] x = (int[] )null;
int y = x.length;
return 666;
}
public static void main( String[] args)
{
try
{
int n = bar( );
System.err.println( "ERROR");
}
catch( NullPointerException npe) { /* EXPECTED */ }
}
}
~/tmp > mygcj --version
gcj (GCC) 4.1.0 20050305 (experimental)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/tmp > mygcj -C Foo.java
~/tmp > mygcj --main=Foo Foo.class
~/tmp > ./a.out
~/tmp > mygcj --main=Foo -O3 Foo.class
~/tmp > ./a.out
~/tmp > mygcj --main=Foo -findirect-dispatch Foo.class
~/tmp > ./a.out
~/tmp > mygcj --main=Foo -findirect-dispatch -O3 Foo.class
~/tmp > ./a.out
ERROR
~/tmp >
-------------------------------- 8< --------------------------------
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/