RFR: 8373411: Crash when PrintSharedArchiveAndExit is enabled but shared heap is disabled
Stefan Karlsson
stefank at openjdk.org
Thu Dec 11 08:59:24 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.
I could change the code to:
size_t StringTable::shared_entry_count() {
assert(HeapShared::is_loading(), "should not reach here");
assert(HeapShared::is_loading_mapping_mode(), "should not reach here");
return _shared_table.entry_count();
}
Personally, I think it is redundant, because the second assert would catch a failure of the first. But if you all think this is better, then I'll add it.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28741#issuecomment-3640906547
More information about the hotspot-runtime-dev
mailing list