ibmruntimes / openj9-openjdk-jdk11

Extensions for OpenJDK 11 for Eclipse OpenJ9
GNU General Public License v2.0
31 stars 112 forks source link

Conform to spec for MethodHandles::loop's with void return types #722

Closed ThanHenderson closed 1 year ago

ThanHenderson commented 1 year ago

This patch fixes eclipse-openj9/openj9#18293; which is really a duplicate of eclipse-openj9/openj9#11937. 'loop' in OJDK MHs does not conform to the spec w.r.t. setting loop finalizers for loop's with void return types. This patch properly sets default finalizer values.

The patch conforms to the spec: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/invoke/MethodHandles.html#loop(java.lang.invoke.MethodHandle[]...) for 3.d

Closes: eclipse-openj9/openj9#18293 Signed-off-by: Nathan Henderson nathan.henderson@ibm.com

ThanHenderson commented 1 year ago

My reasoning for diagnosis was eerily exactly the same as https://github.com/eclipse-openj9/openj9/issues/11937#issuecomment-856086725

Unfortunately, for times sake, I had only discovered the previous issue and PR after I had found the solution.

This will not need to be implemented in JDK8 since MethodHandles.loop does not exist therein.

ThanHenderson commented 1 year ago

ping: @babsingh

babsingh commented 1 year ago

This is a backport of https://github.com/ibmruntimes/openj9-openjdk-jdk16/pull/58.

babsingh commented 1 year ago

jenkins test sanity.functional,sanity.openjdk xlinuxojdk292 jdk11

babsingh commented 1 year ago

Only known issues are seen in the PR builds, which are unrelated to the PR: