RFR: 8373411: Crash when PrintSharedArchiveAndExit is enabled but shared heap is disabled
Aleksey Shipilev
shade at openjdk.org
Thu Dec 11 07:20:23 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.
Hold on, how does it crash? I cannot see right away how this would fail:
size_t StringTable::shared_entry_count() {
assert(HeapShared::is_loading_mapping_mode(), "should not reach here");
return _shared_table.entry_count();
}
class SimpleCompactHashtable {
...
inline size_t entry_count() const {
return _entry_count;
}
...
}
static SharedStringTable _shared_table;
The assert in `StringTable::shared_entry_count()` is likely incomplete too.
-------------
PR Review: https://git.openjdk.org/jdk/pull/28741#pullrequestreview-3566059384
More information about the hotspot-runtime-dev
mailing list