[jdk15u-dev] RFR: 8290417: CDS cannot archive lamda proxy with useImplMethodHandle

Jan Kratochvil duke at openjdk.org
Wed Aug 3 14:40:45 UTC 2022


There was [an accepted backport to OpenJDK-17](https://github.com/openjdk/jdk17u-dev/pull/575).

This OpenJDK-15 backport: The first condition

       // CDS does not handle useImplMethodHandle
       if (useImplMethodHandle)
           return generateInnerClass();

was not applied cleanly as OpenJDK-15 is missing:
- [8257241](https://bugs.openjdk.java.net/browse/JDK-8257241): CDS should not handle disableEagerInitialization for archived lambda proxy classes

This OpenJDK-15 backport: Original commit errors on OpenJDK-15 with:
`      TEST RESULT: Error. can't find jdk.test.lib.helpers.ClassFileInstaller in test directory or libraries`
as OpenJDK-15 is missing:
- [8263412](https://bugs.openjdk.org/browse/JDK-8263412): ClassFileInstaller can't be used by classes outside of default package

This OpenJDK-15 backport: Original commit errors on OpenJDK-15 with:

      error: cannot find symbol
      symbol:   method dumpClassList(String,String,String,String)
      location: class CDSTestUtils

as OpenJDK-15 is missing:
- [8213226](https://bugs.openjdk.org/browse/JDK-8213226): [TESTBUG] Reduce the usage of CDSTestUtils.executeAndLog()


I am not yet an Author - I do not have JBS account.
I have run the testsuite on Linux x86_64 and there is no change of the results. Two new testcases are added and they are both Passing. The testcases are still Passing after backporting them to 15u-dev.

+Passed: runtime/cds/appcds/LambdaWithUseImplMethodHandle.java
+Passed: runtime/cds/appcds/dynamicArchive/DynamicLambdaWithUseImplMethodHandle.java

-------------

Commit messages:
 - whitespace fix
 -     OpenJDK-15 backport: Original commit errors on OpenJDK-15 with:
 -     OpenJDK-15 backport: Original commit errors on OpenJDK-15 with:
 - 8290417: CDS cannot archive lamda proxy with useImplMethodHandle

Changes: https://git.openjdk.org/jdk15u-dev/pull/251/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk15u-dev&pr=251&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8290417
  Stats: 439 lines in 7 files changed: 439 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk15u-dev/pull/251.diff
  Fetch: git fetch https://git.openjdk.org/jdk15u-dev pull/251/head:pull/251

PR: https://git.openjdk.org/jdk15u-dev/pull/251


More information about the jdk-updates-dev mailing list