The split verifier incorrectly throws VerifyError for a getstatic bytecode whose field reference is an array.
For example, the verifier throws:
% $JAVA_HOME/bin/java foo
Exception in thread "main" java.lang.VerifyError: Expecting reference to class in class foo at constant pool index 10
Exception Details:
Location:
foo.main([Ljava/lang/String;)V @0: getstatic
Reason:
Invalid type: '[C' (constant pool 10)
For this:
Constant pool:
#3 = Fieldref #36.#37 // "[C".out:Ljava/io/PrintStream;
...
#36 = Class #55 // "[C"
#37 = NameAndType #57:#58 // out:Ljava/io/PrintStream;
...
#55 = Utf8 [C
...
#57 = Utf8 out
#58 = Utf8 Ljava/io/PrintStream;
Code:
0: getstatic #3 // Field "[C".out:Ljava/io/PrintStream;
The old verifier does not throw a VerifyError for this case.
See attached test case foo.jasm