[lworld] RFR: 8376221: [lworld] Do not store array of InlineLayoutInfo for all InstanceKlasses [v4]

Paul Hübner phubner at openjdk.org
Wed Jan 28 13:06:38 UTC 2026


On Wed, 28 Jan 2026 12:35:49 GMT, Paul Hübner <phubner at openjdk.org> wrote:

>> Joel Sikström has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Exception check should really be an assert
>>  - Move inlineable check to static helper
>
> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 877:
> 
>> 875:         assert(_inline_layout_info_array != nullptr, "Array must have been created");
>> 876:         assert(_inline_layout_info_array->adr_at(field_index)->klass() != nullptr, "Klass must have been set");
>> 877:         _has_inlined_fields = true;
> 
> This seems wrong, even if it was taken from the old code. We're saying that if we've got a buffered LayoutKind, we've got inlined fields, but to my knowledge, a buffered value object is basically a regular object.

We talked about it in-person, and while it should be impossible to have a buffered layout here, we should be more defensive and add an assertion during the layout creation.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1966#discussion_r2736544016


More information about the valhalla-dev mailing list