RFR: 8373411: Crash when PrintSharedArchiveAndExit is enabled but shared heap is disabled

Ioi Lam iklam at openjdk.org
Wed Dec 10 17:31:34 UTC 2025


On Wed, 10 Dec 2025 10:33:04 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

> Found this while poking around at Valhalla that turned off heap sharing. The fix is simple, there's a missing HeapShared::is_loading() check that we missed when refactoring the object streaming code.

test/hotspot/jtreg/runtime/cds/PrintSharedArchiveAndExitNoHeap.java line 26:

> 24: /**
> 25:  * @test
> 26:  * @summary Testing -XX:+PrintSharedArchiveAndExit option with no shared heap

Please add bug ID.

test/hotspot/jtreg/runtime/cds/PrintSharedArchiveAndExitNoHeap.java line 30:

> 28:  * @library /test/lib
> 29:  * @modules java.base/jdk.internal.misc
> 30:  *          java.management

Is this required?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28741#discussion_r2607576451
PR Review Comment: https://git.openjdk.org/jdk/pull/28741#discussion_r2607572681


More information about the hotspot-runtime-dev mailing list