RFR: 8267347: CDS record_linking_constraint asserts with unregistered class
Calvin Cheung
ccheung at openjdk.java.net
Fri May 21 21:42:59 UTC 2021
On Fri, 21 May 2021 17:58:25 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> In CDS terms, "Unregistered classes" are the archived classes that should be loaded by custom class loaders during runtime. Archiving of class loader constraints ([JDK-8178349](https://bugs.openjdk.java.net/browse/JDK-8178349)) should be disabled for such classes.
>
> During CDS dump time (-Xshare:dump), unregistered classes are loaded by the boot loader (see also [JDK-8261941](https://bugs.openjdk.java.net/browse/JDK-8261941)). `SystemDictionaryShared::record_linking_constraint` doesn't properly recognize such classes, leading to the assert.
Looks good. Just one question and one nit.
test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/LoaderConstraintsTest.java line 52:
> 50: httpHandlerClass,
> 51: httpExchangeClass,
> 52: Asserts.class.getName(),
Why other class names don't need to do `replace(".", "/")`?
test/hotspot/jtreg/runtime/cds/appcds/test-classes/CustomAppLoader.java line 32:
> 30:
> 31: // This is a handy class for running an application inside a custom class loader. This
> 32: // is used for testing CDS handling of unregistered classes (i.e., archved classes loaded
Typo: archved -> archived
-------------
Marked as reviewed by ccheung (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4147
More information about the hotspot-runtime-dev
mailing list