RFR: 8285914: AppCDS crash when using shared archive with old class file from JUnit

David Holmes dholmes at openjdk.java.net
Wed May 4 22:49:18 UTC 2022


On Wed, 4 May 2022 18:20:14 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> Please review this change for an additional check before archiving a lambda proxy class. If the nest host of an lambda proxy class cannot be verified during dump time due to its major version is < JDK_6 (50), the lambda proxy class should not be archived. This avoids accessing a null nest host during runtime while loading the lambda proxy class from the CDS archive.
> 
> Passed the test in the bug report.
> 
> Passed CI tiers 1 - 4 testing (including the new tests).

Pardon my ignorance but how can a JDK 6 version classfile have any association with a lambda proxy? Has the lambda proxy been "hand crafted" to refer to an old version "host" class? Is that even legal? There can't be a valid nest-mate relationship here.

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

PR: https://git.openjdk.java.net/jdk/pull/8540


More information about the hotspot-runtime-dev mailing list