-
Bug
-
Resolution: Fixed
-
P2
-
8u40, 9
-
b43
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084734 | emb-9 | Vladimir Ivanov | P2 | Resolved | Fixed | team |
JDK-8068115 | 8u45 | Vladimir Ivanov | P2 | Resolved | Fixed | b02 |
JDK-8066891 | 8u40 | Vladimir Ivanov | P2 | Closed | Fixed | b19 |
JDK-8069980 | emb-8u47 | Vladimir Ivanov | P2 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.8.0_40-ea"
Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b18, mixed mode)
FULL OS VERSION :
Linux macnux 3.16.3-031603-generic #201409171435 SMP Wed Sep 17 18:36:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
First of all, reported on 8u40 but he bug occurs with JDK 1.8.0u40 and JDK 1.9.0b39.
It is a blocker for Groovy (invokedynamic version), that we test against the latest EAP releases. The test case attached runs fine on 8u20, but fails on the above versions with the following stack trace:
java.lang.ClassCastException: Cannot cast [Ljava.lang.String; to java.lang.String
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:365)
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:360)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at TestScript0.getStringArrayIndirectlyWithType_Length(TestScript0.groovy:6)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at TestScript0.run(TestScript0.groovy:8)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:608)
at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:80)
at groovy.util.GroovyTestCase.assertScript(GroovyTestCase.java:200)
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
REGRESSION. Last worked in version 8u20
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Download https://dl.dropboxusercontent.com/u/20288797/bug_jdk9.tgz
2. tar xzvf bug_jdk9.tgz
3. cd bug_jdk9
4. ./gradlew test
The test will fail and generate a report with the exception above.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.ClassCastException: Cannot cast [Ljava.lang.String; to java.lang.String
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:365)
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:360)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at TestScript0.getStringArrayIndirectlyWithType_Length(TestScript0.groovy:6)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at TestScript0.run(TestScript0.groovy:8)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:608)
at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:80)
at groovy.util.GroovyTestCase.assertScript(GroovyTestCase.java:200)
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_40-ea"
Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b18, mixed mode)
FULL OS VERSION :
Linux macnux 3.16.3-031603-generic #201409171435 SMP Wed Sep 17 18:36:23 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
First of all, reported on 8u40 but he bug occurs with JDK 1.8.0u40 and JDK 1.9.0b39.
It is a blocker for Groovy (invokedynamic version), that we test against the latest EAP releases. The test case attached runs fine on 8u20, but fails on the above versions with the following stack trace:
java.lang.ClassCastException: Cannot cast [Ljava.lang.String; to java.lang.String
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:365)
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:360)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at TestScript0.getStringArrayIndirectlyWithType_Length(TestScript0.groovy:6)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at TestScript0.run(TestScript0.groovy:8)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:608)
at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:80)
at groovy.util.GroovyTestCase.assertScript(GroovyTestCase.java:200)
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
REGRESSION. Last worked in version 8u20
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Download https://dl.dropboxusercontent.com/u/20288797/bug_jdk9.tgz
2. tar xzvf bug_jdk9.tgz
3. cd bug_jdk9
4. ./gradlew test
The test will fail and generate a report with the exception above.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.ClassCastException: Cannot cast [Ljava.lang.String; to java.lang.String
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:365)
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:360)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at TestScript0.getStringArrayIndirectlyWithType_Length(TestScript0.groovy:6)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.LambdaForm.interpret_L(LambdaForm.java:681)
at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:625)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at TestScript0.run(TestScript0.groovy:8)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:627)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:608)
at groovy.test.GroovyAssert.assertScript(GroovyAssert.java:80)
at groovy.util.GroovyTestCase.assertScript(GroovyTestCase.java:200)
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8068115 MHs.explicitCastArguments does incorrect type checks for VarargsCollector
- Resolved
-
JDK-8069980 MHs.explicitCastArguments does incorrect type checks for VarargsCollector
- Resolved
-
JDK-8084734 MHs.explicitCastArguments does incorrect type checks for VarargsCollector
- Resolved
-
JDK-8066891 MHs.explicitCastArguments does incorrect type checks for VarargsCollector
- Closed
- relates to
-
JDK-8162697 Fuzzing test for MethodHandles
- Closed