Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OJDK MH: MethodHandles.collectArguments Issues #11922

Closed
babsingh opened this issue Feb 9, 2021 · 3 comments
Closed

OJDK MH: MethodHandles.collectArguments Issues #11922

babsingh opened this issue Feb 9, 2021 · 3 comments
Labels
comp:jclextensions prio:low project:MH Used to track Method Handles related work

Comments

@babsingh
Copy link
Contributor

babsingh commented Feb 9, 2021

Errors

MethodHandles.collectArguments issues that are seen when OJDK MHs are enabled in OpenJ9.

java.lang.IndexOutOfBoundsException: bad index: 3
	at java.base/java.lang.invoke.MethodType.newIndexOutOfBoundsException(MethodType.java:233) from jrt:/java.base
	at java.base/java.lang.invoke.MethodType.insertParameterTypes(MethodType.java:438) from jrt:/java.base
	at java.base/java.lang.invoke.MethodType.insertParameterTypes(MethodType.java:479) from jrt:/java.base
	at java.base/java.lang.invoke.MethodHandles.collectArgumentsChecks(MethodHandles.java:5752) from jrt:/java.base
	at java.base/java.lang.invoke.MethodHandles.collectArguments(MethodHandles.java:5732) from jrt:/java.base
java.lang.ArrayIndexOutOfBoundsException
	at java.base/java.lang.invoke.MethodType.parameterType(MethodType.java:775) from jrt:/java.base
	at java.base/java.lang.invoke.MethodHandles.collectArgumentsChecks(MethodHandles.java:5754) from jrt:/java.base
	at java.base/java.lang.invoke.MethodHandles.collectArguments(MethodHandles.java:5732) from jrt:/java.base

Failing Test Targets

  1. JCL_Test_* [sanity.functional]
    • test_CollectArgumentsNegative
    • test_VoidCollectArgumentsNegative

Repetitions of the above error are seen because the test target is run with different JVM arguments.

How-to Run Tests?

https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md

Steps to build an OpenJ9 JDK with OJDK MHs enabled

Refer to #11458.

@babsingh
Copy link
Contributor Author

babsingh commented Feb 9, 2021

OpenJDK bug: https://bugs.openjdk.java.net/browse/JDK-8259922

Fix: ibmruntimes/openj9-openjdk-jdk@ab6b9c3

Only available in JDK-next. Needs to be back-ported to JDK8, JDK11 and JDK16.

This should be tagged with the project:MH label.

@babsingh babsingh changed the title MethodHandles.collectArguments OJDK MH: MethodHandles.collectArguments Issues Feb 9, 2021
@pshipton pshipton added comp:vm project:MH Used to track Method Handles related work labels Feb 9, 2021
@fengxue-IS
Copy link
Contributor

Still needs to be back-ported to JDK8, JDK11 in the future once we are ready to enable OJDK MH for these versions.
As this is fixed for Java17+, marking this low priority

@babsingh babsingh closed this as completed May 2, 2022
Adopt OpenJDK MethodHandles automation moved this from To do to Done May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jclextensions prio:low project:MH Used to track Method Handles related work
Development

No branches or pull requests

3 participants