-
Notifications
You must be signed in to change notification settings - Fork 715
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
Handle interface special cases for MethodHandle #2860
Conversation
This is the reverted #2774 with fixes and matching test updates. |
a38d4a9
to
b764c90
Compare
Using unmodified test code. JDK11: PASSED: test_bindTo_interfaceMethodImplementation_package JDK10: PASSED: test_bindTo_interfaceMethodImplementation_package So, invoking private implementation of an interface method results in AbstractMethodError in JDK11, but IllegalAccessError in previous JDKs. default and protected result in IllegalAccessError everywhere. |
- the final (non-virtual Object method) case was not being handled correctly in adaptInterfaceLookupsOfObjectMethodsIfRequired. - findVirtual of private interface methods allowed in JDK11 and beyond - unreflect of private interface methods allowed in JDK9 and beyond - invoking a private implementation of an interface method results in AbstractMethodError in JDK11 and beyond, IllegalAccessError before - fix interpreter to only throw AbstractMethodError for private implementations of interface methods in JDK11 - update tests according to behaviour changes after JDK8 - document that Java_java_lang_invoke_InterfaceHandle_convertITableIndexToVTableIndex does not need to deal with any special case interface invocations [ci skip] Signed-off-by: Graham Chapman <graham_chapman@ca.ibm.com>
jenkins test all xlinux jdk8,jdk10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
I think we'll need to look at the MethodHandles.revealDirect() to make sure the MHInfo returned is correct for all 3 cases of interfacehandles. That can be done as a separate task
jenkins test sanity xlinux jdk11 |
Jenkins test extended plinux jdk11 |
JDK8 extended failed "TestAttachErrorHandling_SE80_0", which is obviously an intermittent failure unrelated to this PR. |
10 failing "TestAttachErrorHandling_0" which is clearly the same thing. |
JDK11 sanity failed for what looks like flaky filesystem, again nothing to do with this PR. |
The 292 tests have passed in 11 extended. |
@llxia Please review the test changes (the build changes were provided by you!) |
The JSR292 failure in JDK11 extended is also a flaky filesystem. I vaguely remember a time when tests actually passed on a regular basis. |
Despite the fact that pretty much every test job failed, this PR is ready for merge once approved. |
Investigating attach API failures under #2871. |
@llxia Can you review the tests? we want this merged for jdk11 |
the final (non-virtual Object method) case was not being handled
correctly in adaptInterfaceLookupsOfObjectMethodsIfRequired.
findVirtual of private interface methods allowed in JDK11 and beyond
unreflect of private interface methods allowed in JDK9 and beyond
invoking a private implementation of an interface method results in
AbstractMethodError in JDK11 and beyond, IllegalAccessError before
fix interpreter to only throw AbstractMethodError for private implementations of interface methods in JDK11
update tests according to behaviour changes after JDK8
document that
Java_java_lang_invoke_InterfaceHandle_convertITableIndexToVTableIndex
does not need to deal with any special case interface invocations
Fixes: #2811
[ci skip]
Signed-off-by: Graham Chapman graham_chapman@ca.ibm.com