[lworld] RFR: 8377467: [lworld] More defensive assertion guards for array layouts and properties

Coleen Phillimore coleenp at openjdk.org
Mon Feb 23 16:47:31 UTC 2026


On Fri, 13 Feb 2026 12:53:55 GMT, Paul Hübner <phubner at openjdk.org> wrote:

>> Hi all,
>> 
>> This change hardens our assertions and fixes a bug. 
>> 
>> Testing: tiers 1-3.
>
> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 104:
> 
>> 102: 
>> 103:   if (lk != LayoutKind::REFERENCE) {
>> 104:     assert(lk != LayoutKind::BUFFERED, "Sanity check");
> 
> I'm not sure if this is 100% correct. As far as I know we don't use BUFFERED when building the layout but I could be mistaken, and my tests pass. Let me know!

Yes, this seems right.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/2103#discussion_r2841894494


More information about the valhalla-dev mailing list