RFR: 8278131: runtime/cds/appcds/dynamicArchive/* tests failing in loom repo

Alan Bateman alanb at openjdk.java.net
Wed Dec 15 07:43:58 UTC 2021


On Wed, 15 Dec 2021 04:34:23 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> The class `c` is defined by a custom class loader (`urlClassLoader`). Before this patch, when `urlClassLoader` and `c` fall out of scope, this class becomes eligible for garbage collection.

Using a static field in this context is okay. Another useful approach would be use Reference.reachabilityFence at the end of the method to keep c alive.

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

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


More information about the hotspot-runtime-dev mailing list