On Mon, 6 Apr 2026 17:18:18 GMT, Frederic Parain <[email protected]> wrote:
> Fix a bug in the computation of layouts of abstract value classes inheriting > fields. There was a missing case in the computation of the starting point for > the insertion of new fields. The FieldLayoutAnalyzer has been extended to > always verify that the alignment of the first field is compatible with the > alignment constraint of the payload. No new test was necessary, the new > verification in the FieldLayoutAnalyzer is sufficient to detect the issue > when running the ValueRandomLayoutTest test. > > Testing in progress (tier1-4). > > Thanks. > > Fred The changes look good, thank you for fixing. src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 1172: > 1170: // the first inherited field. > 1171: _payload_alignment = type2aelembytes(BasicType::T_LONG); > 1172: _layout->set_start(_layout->first_field_block()); Nit: duplicate of what the concrete value class does, could be factored out into a common path. ------------- Marked as reviewed by phubner (Committer). PR Review: https://git.openjdk.org/valhalla/pull/2301#pullrequestreview-4073647812 PR Review Comment: https://git.openjdk.org/valhalla/pull/2301#discussion_r3049983090
