This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Problems with Serializable-String[] in 2.96
- From: Tom Tromey <tromey at redhat dot com>
- To: Pete Kelly <ramsfanxxxiv at yahoo dot com>
- Cc: Jeff Sturm <jsturm at one-point dot com>, java at gcc dot gnu dot org
- Date: 16 Sep 2002 16:31:54 -0600
- Subject: Re: Problems with Serializable-String[] in 2.96
- References: <20020916220714.57885.qmail@web14609.mail.yahoo.com>
- Reply-to: tromey at redhat dot com
>>>>> "Pete" == Pete Kelly <ramsfanxxxiv@yahoo.com> writes:
Pete> [root@PetesRedHat java]# gcj --main=example.TestSer -o
Pete> Test TestSer.class
Pete> example/TestSer.java: In class `example.TestSer':
Pete> example/TestSer.java: In method
Pete> `example.TestSer.main(java.lang.String[])':
Pete> example/TestSer.java:9: verification error at PC=52
Pete> example/TestSer.java:9: invalid argument type
Pete> example/TestSer.java:9: expected type
Pete> 'java.io.Serializable' but stack
Pete> contains 'java.lang.String[]'
This is a known bug in the gcj verifier. Eric Blake sent a PR for it
just a few days ago.
The problem is that gcj doesn't correctly notice that an array
implements Cloneable and Serializable. The front end accepts this
code since it has special cases for this.
One workaround for you would be to compile your program from source,
not from .class files.
Tom