Integrated: 8261532: Archived superinterface class cannot be accessed

Calvin Cheung ccheung at openjdk.java.net
Thu Mar 4 20:02:40 UTC 2021


On Wed, 3 Mar 2021 23:34:58 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> Problem: If an interface is in the CDS archive but not the class which implements the interface. During runtime, IllegalAccessError will result when the class is being loaded.
> 
> Fix:
> In `InstanceKlass::set_packge()` when checking if we can use a saved copy of the` _package_entry`, add a NULL check for `_package_entry` before returning. In `SystemDictionaryShared::prepare_shared_lambda_proxy_class()`, we can obtain the `_package_entry` directly from the `caller_ik` instead of calling `get_package_entry_from_class()`.
> 
> Testing: passed mach5 tiers 1 - 4 tests.

This pull request has now been integrated.

Changeset: 02fbcb52
Author:    Calvin Cheung <ccheung at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/02fbcb52
Stats:     183 lines in 6 files changed: 180 ins; 0 del; 3 mod

8261532: Archived superinterface class cannot be accessed

Reviewed-by: minqi, iklam

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

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


More information about the hotspot-runtime-dev mailing list