java/6163: anonymous class verifier error

nferrier@tapsellferrier.co.uk nferrier@tapsellferrier.co.uk
Wed Apr 3 16:57:00 GMT 2002


>Number:         6163
>Category:       java
>Synopsis:       anonymous class verifier error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 03 16:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nic Ferrier
>Release:        3.1 20020403 (prerelease)
>Organization:
>Environment:
linux-ppc
>Description:
When compiling to byte-code source with anonymous classes GCJ produces code which causes verifier errors with Sun's interpreter.



Note: this is stopping me reporting another anonymous classes bug for which I'm trying to produce a good test case.
>How-To-Repeat:
Compile the attached code thus:



   gcj -C -d . -classpath . A.java test.java



And then execute:



   java test



With GCJ you get this:



Exception in thread "main" java.lang.VerifyError: (class: test$1, method: <init> signature: (Ltest;Ljava/lang/String;IZ)V) Expecting to find object/array on stack

        at test.main(test.java:15)



With Sun's javac it compiles and runs quite happily. You should see the following output:



some overridden value

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list