-
Notifications
You must be signed in to change notification settings - Fork 737
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
[JDK8 OJDK-MH] AbstractMethodError not thrown #14985
Labels
Comments
This was referenced Nov 22, 2023
ThanHenderson
added a commit
to ThanHenderson/openj9-openjdk-jdk8
that referenced
this issue
Dec 1, 2023
This patch addresses eclipse-openj9/openj9#14985. For MethodHandles to private interface methods, the RI erroneously initializes the MethodHandle to have an InvokeInterface reference kind, leading to an invoke-time AbstractMethodError throw. As per the spec, OpenJ9 initializes MethodHandles to private interface methods to have an InvokeSpecial reference kind which does not throw the error. This distinction causes a test failure for a test reported in eclipse-openj9/openj9#14985. Though not-spec compliant, the test expects an AbstractMethodError to be thrown to conform to the RI behaviour. For OpenJ9 MHs, MethodHandles.unreflect identifies private interface methods and installs an AbstractMethodError-thrower MH. This patch sets up a similar mechanisms for OpenJDK MHs by calling a MethodHandleResolver method that installs the AbstractMethodError-thrower MH. Issues: eclipse-openj9/openj9#14985 Signed-off-by: Nathan Henderson <[email protected]>
This was referenced Dec 1, 2023
ThanHenderson
added a commit
to ThanHenderson/openj9-openjdk-jdk8
that referenced
this issue
Dec 1, 2023
This patch addresses eclipse-openj9/openj9#14985. For MethodHandles to private interface methods, the RI erroneously initializes the MethodHandle to have an InvokeInterface reference kind, leading to an invoke-time AbstractMethodError throw. As per the spec, OpenJ9 initializes MethodHandles to private interface methods to have an InvokeSpecial reference kind which does not throw the error. This distinction causes a test failure for a test reported in eclipse-openj9/openj9#14985. Though not-spec compliant, the test expects an AbstractMethodError to be thrown to conform to the RI behaviour. For OpenJ9 MHs, MethodHandles.unreflect identifies private interface methods and installs an AbstractMethodError-thrower MH. This patch sets up a similar mechanisms for OpenJDK MHs by calling a MethodHandleResolver method that installs the AbstractMethodError-thrower MH. Issues: eclipse-openj9/openj9#14985 Signed-off-by: Nathan Henderson <[email protected]>
ThanHenderson
added a commit
to ThanHenderson/openj9-openjdk-jdk8
that referenced
this issue
Dec 1, 2023
This patch addresses eclipse-openj9/openj9#14985. For MethodHandles to private interface methods, the RI erroneously initializes the MethodHandle to have an InvokeInterface reference kind, leading to an invoke-time AbstractMethodError throw. As per the spec, OpenJ9 initializes MethodHandles to private interface methods to have an InvokeSpecial reference kind which does not throw the error. This distinction causes a test failure for a test reported in eclipse-openj9/openj9#14985. Though not-spec compliant, the test expects an AbstractMethodError to be thrown to conform to the RI behaviour. For OpenJ9 MHs, MethodHandles.unreflect identifies private interface methods and installs an AbstractMethodError-thrower MH. This patch sets up a similar mechanisms for OpenJDK MHs by calling a MethodHandleResolver method that installs the AbstractMethodError-thrower MH. Issues: eclipse-openj9/openj9#14985 Signed-off-by: Nathan Henderson <[email protected]>
ThanHenderson
added a commit
to ThanHenderson/openj9
that referenced
this issue
Dec 4, 2023
This patch addresses eclipse-openj9#14985. For MethodHandles to private interface methods, the RI erroneously initializes the MethodHandle to have an InvokeInterface reference kind, leading to an invoke-time AbstractMethodError throw. As per the spec, OpenJ9 initializes MethodHandles to private interface methods to have an InvokeSpecial reference kind which does not throw the error. This distinction causes a test failure for a test reported in eclipse-openj9#14985. Though not-spec compliant, the test expects an AbstractMethodError to be thrown to conform to the RI behaviour in JDK8. For OpenJ9 MHs, MethodHandles.unreflect identifies private interface methods and installs an AbstractMethodError-thrower MH. This patch sets up a MethodHandleResolver method that installs the AbstractMethodError-thrower MH when called from OpenJDK MH unreflect implementation. Issues: eclipse-openj9#14985 Signed-off-by: Nathan Henderson <[email protected]>
ThanHenderson
added a commit
to ThanHenderson/openj9-openjdk-jdk8
that referenced
this issue
Dec 4, 2023
This patch addresses eclipse-openj9/openj9#14985. For MethodHandles to private interface methods, the RI erroneously initializes the MethodHandle to have an InvokeInterface reference kind, leading to an invoke-time AbstractMethodError throw. As per the spec, OpenJ9 initializes MethodHandles to private interface methods to have an InvokeSpecial reference kind which does not throw the error. This distinction causes a test failure for a test reported in eclipse-openj9/openj9#14985. Though not-spec compliant, the test expects an AbstractMethodError to be thrown to conform to the RI behaviour. For OpenJ9 MHs, MethodHandles.unreflect identifies private interface methods and installs an AbstractMethodError-thrower MH. This patch sets up a similar mechanism for OpenJDK MHs by calling a MethodHandleResolver method that installs the AbstractMethodError-thrower MH. Issues: eclipse-openj9/openj9#14985 Signed-off-by: Nathan Henderson <[email protected]>
Closing due to PRs #18552 and ibmruntimes/openj9-openjdk-jdk8#715 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The below failure(s) is(are) only seen when OJDK MHs are enabled in OpenJ9.
Errors
Failing Test Targets
BUILD_LIST=functional
jsr335_interfacePrivateMethod_0
jsr335_interfacePrivateMethod_1
How-to Run Tests?
https://github.com/eclipse/openj9/blob/master/test/docs/OpenJ9TestUserGuide.md
Steps to build an OpenJ9 JDK8 with OJDK MHs enabled
Refer to #14541.
The text was updated successfully, but these errors were encountered: