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).

Yep, I originally tripped on this for a similar patch for bang prototype :(

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

Marked as reviewed by liach (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2367#pullrequestreview-4181484916

Reply via email to