JDK-8006684 : Compiler produces java.lang.VerifyError: Bad type on operand stack
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-01-22
  • Updated: 2013-06-06
  • Resolved: 2013-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b75Fixed
Description
Compiler produces java.lang.VerifyError: Bad type on operand stack for the following JCK compiler tests
	lang/LMBD/lmbd010/lmbd01001m6/lmbd01001m6.html
	lang/LMBD/lmbd010/lmbd01001m61/lmbd01001m61.html
	lang/LMBD/lmbd010/lmbd01001m7/lmbd01001m7.html
	lang/LMBD/lmbd010/lmbd01001m71/lmbd01001m71.html
	lang/LMBD/lmbd012/lmbd01201m0/lmbd01201m0.html
	lang/LMBD/lmbd012/lmbd01201m01/lmbd01201m01.html
	lang/LMBD/lmbd012/lmbd01201m1/lmbd01201m1.html
	lang/LMBD/lmbd012/lmbd01201m11/lmbd01201m11.html
	lang/LMBD/lmbd012/lmbd01201m2/lmbd01201m2.html
	lang/LMBD/lmbd012/lmbd01201m21/lmbd01201m21.html
	lang/LMBD/lmbd033/lmbd03301m0/lmbd03301m0.html
	lang/LMBD/lmbd033/lmbd03301m01/lmbd03301m01.html
	lang/LMBD/lmbd033/lmbd03301m1/lmbd03301m1.html
	lang/LMBD/lmbd033/lmbd03301m11/lmbd03301m11.html
	lang/LMBD/lmbd033/lmbd03301m2/lmbd03301m2.html
	lang/LMBD/lmbd033/lmbd03301m21/lmbd03301m21.html
	lang/LMBD/lmbd034/lmbd03401m0/lmbd03401m0.html
	lang/LMBD/lmbd034/lmbd03401m1/lmbd03401m1.html
	lang/LMBD/lmbd034/lmbd03401m2/lmbd03401m2.html
	lang/LMBD/lmbd035/lmbd03501m1/lmbd03501m1.html
	lang/LMBD/lmbd035/lmbd03501m2/lmbd03501m2.html
	lang/LMBD/lmbd035/lmbd03501m3/lmbd03501m3.html

java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    javasoft/sqe/tests/lang/lmbd010/lmbd01001m6/lmbd01001m6.run([Ljava/lang/String;Ljava/io/PrintStream;)I @1: invokedynamic
  Reason:
    Type '[Ljava/lang/String;' (current frame, stack[0]) is not assignable to 'javasoft/sqe/tests/lang/lmbd010/lmbd01001m6/lmbd01001m6'
  Current Frame:
    bci: @1
    flags: { }
    locals: { '[Ljava/lang/String;', 'java/io/PrintStream' }
    stack: { '[Ljava/lang/String;' }
  Bytecode:
    0000000: 2aba 0005 0000 4d2c 08b9 0006 0200 3e1d
    0000010: 1006 9f00 262b bb00 0759 b700 0812 09b6
    0000020: 000a 1db6 000b 120c b600 0a10 06b6 000b
    0000030: b600 0db6 000e 05ac 03ac               
  Stackmap Table:
    append_frame(@56,Object[#31],Integer)

	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2443)
	at java.lang.Class.getMethod0(Class.java:2686)
	at java.lang.Class.getMethod(Class.java:1620)
	at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:521)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:489)
Exception in thread "main" 

Comments
verified in jdk8 b92
06-06-2013

Minimal test case: interface I { void foo(); } class lmbd01001m6 { public static void main(String argv[]) { I lmbd = () -> { Object comp = new Object() {}; }; } }
22-01-2013

Bad translation logic causes generation of spurious non-static inner classes
22-01-2013