JDK-8285395 : [JVMCI] [11u] Partial backport of JDK-8220623: InstalledCode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.15
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2022-04-21
  • Updated: 2022-04-25
  • Resolved: 2022-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11.0.16 masterFixed
Related Reports
Relates :  
Description
 JDK-8220623 available in JDK 13 and better includes an update to InstalledCode class making getAddress() and getEntryPoint() methods no longer final.

In GraalVM those methods are overriden in latest code thus breaking the build using plain OpenJDK 11u as base JDK:

substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/meta/SubstrateInstalledCodeImpl.java:67: error: getAddress() in SubstrateInstalledCodeImpl cannot override getAddress() in InstalledCode
    public long getAddress() {
                ^
  overridden method is final
substratevm/src/com.oracle.svm.graal/src/com/oracle/svm/graal/meta/SubstrateInstalledCodeImpl.java:73: error: getEntryPoint() in SubstrateInstalledCodeImpl cannot override getEntryPoint() in InstalledCode
    public long getEntryPoint() {
                ^
  overridden method is final
2 errors

As backporting all of JDK-8220623 is too risky for a stable JDK release we should consider only a partial backport including changes to InstalledCode.java only which is a lot less risky.
Comments
Changeset: d9be932a Author: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2022-04-25 15:13:40 +0000 URL: https://git.openjdk.java.net/jdk11u-dev/commit/d9be932a45b8a6e22ab951bbb2586544b93a738d
25-04-2022

OK. Added the [11u] into the synopsis.
25-04-2022

An [11u] in the bug title would be helpful. Can you still squeeze this in? The JBS issue title is editable. Thanks, Goetz.
25-04-2022

Fix Request (OpenJDK 11u): Please approve this partial, low-risk, backport in one file in the JVMCI code. The change aligns the code in InstalledCode to the JDK 13+ code line making those two methods no longer final. That's it. The patch has been reviewed by Andrew Dinn and is local to JVMCI. Tested with jvmci tests which pass. Also tested a build with latest graalvm master which succeeds to build again with plain OpenJDK 11u.
22-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk11u-dev/pull/1038 Date: 2022-04-21 17:45:16 +0000
21-04-2022

This is breaking the JDK 11-based build of Mandrel in the upcoming 22.2 GraalVM release. See: https://github.com/graalvm/mandrel/issues/373
21-04-2022