[lworld] RFR: 8370217: [lworld] Crash in add_migrated_value_classes after merging JDK-8350550
Matias Saavedra Silva
matsaave at openjdk.org
Tue Oct 28 19:13:04 UTC 2025
On Fri, 24 Oct 2025 17:30:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The method add_migrated_value_classes() is being called in non-preview mode leading to an assert due to the expected classes not being present in the AOT cache. The check for `EnableValhalla` is replaced with a check for preview mode. Verified with tier 1-5 tests.
>
> src/hotspot/share/classfile/systemDictionary.cpp line 215:
>
>> 213: } else {
>> 214: ClassLoaderData* cld = ClassLoaderDataGraph::find_or_create(class_loader);
>> 215: if (CDSConfig::is_valhalla_preview()) {
>
> Since this method was refactored to not be only CDS, I think you should use Arguments::enable_preview() as the test instead of the CDS specific test.
Although it's redundant at the moment, I think this needs to also check for `EnableValhalla`. In case that enable-preview and EnableValhalla are separated, it needs to be clear what is being checked here. This will also be an easier case to grep for once we consider merging into mainline.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1698#discussion_r2470753195
More information about the valhalla-dev
mailing list