JDK-8143798 : jck failures: api/java_lang/invoke/MethodHandle/index_MethodsTests[asSpreaderWMTE]: java.lang.VerifyError: Bad type on operand stack
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-11-23
  • Updated: 2016-05-27
  • Resolved: 2015-11-25
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 9
9 b96Fixed
Related Reports
Relates :  
Description
jdk9 b94 VM PIT testing.
jck test api/java_lang/invoke/MethodHandle/index_MethodsTests[asSpreaderWMTE] failed on all platforms.

Expected exception java.lang.invoke.WrongMethodTypeException was not thrown by testcase "asSpreaderWMTE"
"java.lang.InternalError: BMH.reinvoke=Lambda(a0:L/SpeciesData<L>,a1:I,a2:L)=>{
    t3:V=MethodHandleImpl.checkSpreadArgument(a2:L,1);
    t4:L=ArrayAccessor.getElementL(a2:L,0);
    t5:L=Species_L.argL0(a0:L);
    t6:L=MethodHandle.invokeBasic(t5:L,a1:I,t4:L);t6:L}" was thrown instead
java.lang.InternalError: BMH.reinvoke=Lambda(a0:L/SpeciesData<L>,a1:I,a2:L)=>{
    t3:V=MethodHandleImpl.checkSpreadArgument(a2:L,1);
    t4:L=ArrayAccessor.getElementL(a2:L,0);
    t5:L=Species_L.argL0(a0:L);
    t6:L=MethodHandle.invokeBasic(t5:L,a1:I,t4:L);t6:L}
	at java.lang.invoke.MethodHandleStatics.newInternalError(MethodHandleStatics.java:127)
	at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:660)
	at java.lang.invoke.LambdaForm.prepare(LambdaForm.java:635)
	at java.lang.invoke.MethodHandle.<init>(MethodHandle.java:460)
	at java.lang.invoke.BoundMethodHandle.<init>(BoundMethodHandle.java:58)
	at java.lang.invoke.BoundMethodHandle$Species_L.<init>(BoundMethodHandle.java:211)
	at java.lang.invoke.BoundMethodHandle$Species_L.copyWith(BoundMethodHandle.java:228)
	at java.lang.invoke.MethodHandle.asSpreader(MethodHandle.java:923)
	at java.lang.invoke.MethodHandle.asSpreader(MethodHandle.java:875)
	at javasoft.sqe.tests.api.java.lang.invoke.MethodHandle.MethodsTests.asSpreaderWMTE(MethodsTests.java:447)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:520)
	at com.sun.tck.lib.tgf.TGFUtils.invokeMethod(TGFUtils.java:357)
	at com.sun.tck.lib.tgf.Runner.invokeTestCase(Runner.java:285)
	at com.sun.tck.lib.tgf.Runner.performRunWithData(Runner.java:255)
	at com.sun.tck.lib.tgf.Runner.getDataAndRun(Runner.java:194)
	at com.sun.tck.lib.tgf.Runner.executeTestMethods(Runner.java:137)
	at com.sun.tck.lib.tgf.Runner.run(Runner.java:123)
	at com.sun.tck.lib.tgf.Runner.execute(Runner.java:115)
	at com.sun.tck.lib.tgf.TGFTest.run(TGFTest.java:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:520)
	at com.sun.jck.lib.ExecJCKTestSameJVMCmd$Version2Test.execute(ExecJCKTestSameJVMCmd.java:465)
	at com.sun.jck.lib.ExecJCKTestSameJVMCmd$StandardTest.run(ExecJCKTestSameJVMCmd.java:422)
	at com.sun.jck.lib.ExecJCKTestSameJVMCmd.execute(ExecJCKTestSameJVMCmd.java:306)
	at com.sun.jck.lib.ExecJCKTestSameJVMCmd.run(ExecJCKTestSameJVMCmd.java:226)
	at com.sun.javatest.agent.Agent$Task.executeCommand(Agent.java:845)
	at com.sun.javatest.agent.Agent$Task.execute(Agent.java:789)
	at com.sun.javatest.agent.Agent$Task.handleRequest(Agent.java:645)
	at com.sun.javatest.agent.Agent.handleRequestsUntilClosed(Agent.java:416)
	at com.sun.javatest.agent.Agent.access$000(Agent.java:60)
	at com.sun.javatest.agent.Agent$1.run(Agent.java:282)
	at java.lang.Thread.run(Thread.java:747)
Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    java/lang/invoke/LambdaForm$BMH.reinvoke(Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object; @33: invokevirtual
  Reason:
    Type 'int' (current frame, stack[2]) is not assignable to integer
  Current Frame:
    bci: @33
    flags: { }
    locals: { 'java/lang/Object', integer, '[Ljava/lang/Object;', 'java/lang/Object', 'java/lang/Object' }
    stack: { 'java/lang/invoke/MethodHandle', integer, 'int' }
  Bytecode:
    0000000: 2c04 b800 102c c000 1259 4d03 324e 2ac0
    0000010: 0014 b400 183a 0419 04c0 001a 1b2d c000
    0000020: 1cb6 0020 b0                           

	at jdk.internal.misc.Unsafe.defineAnonymousClass(Native Method)
	at java.lang.invoke.InvokerBytecodeGenerator.loadAndInitializeInvokerClass(InvokerBytecodeGenerator.java:283)
	at java.lang.invoke.InvokerBytecodeGenerator.loadMethod(InvokerBytecodeGenerator.java:275)
	at java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(InvokerBytecodeGenerator.java:617)
	at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:654)
	... 35 more
Testcase "asSpreaderWMTE" failed with arguments [class [Ljava.lang.String;, 1]
Comments
Reproduces locally using JCK-runtime-9 in jdk9/dev: java -cp JCK-runtime-9/classes javasoft.sqe.tests.api.java.lang.invoke.MethodHandle.MethodsTests Isolated to changeset for JDK-8139885
23-11-2015