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: Problems with Serializable-String[] in 2.96


>>>>> "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


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