On Mon, 27 Apr 2026 07:57:48 GMT, Joel Sikström <[email protected]> wrote:

> Hello,
> 
> The updates to the field_flags in `ClassFileParser::fetch_field_classes` are 
> updating on a copy of field_flags instead of a reference. And the field_flags 
> are in turn gotten from a copy of the fieldinfo, not a reference.
> 
> This ends up keeping the field marked as a null_free_inline_type, which is 
> not true given that we've downgraded the field from null-restricted to 
> nullable, so anyone asking if this field is null-free might be fooled. 
> 
> I've adapted/enhanced the 
> `test/hotspot/jtreg/runtime/valhalla/inlinetypes/PreloadCircularityTest.java` 
> test to check for this using reflection and the internal ValueClass API.
> 
> Testing:
> * Adapted 
> `test/hotspot/jtreg/runtime/valhalla/inlinetypes/PreloadCircularityTest.java` 
> fails before fix, passes after.
> * Running Oracle's tier1-3
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 6dbddf4d
Author:    Joel Sikström <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/6dbddf4d029491b83f3cd98ae2849b297a1f8531
Stats:     53 lines in 2 files changed: 43 ins; 0 del; 10 mod

8383242: [lworld] Update on copy-of-copy in ClassFileParser::fetch_field_classes

Reviewed-by: fparain, liach

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

PR: https://git.openjdk.org/valhalla/pull/2367

Reply via email to