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). ------------- Commit messages: - Adapt PreloadCircularityTest.java to also check isNullRestricted field property - 8383242: [lworld] Update on copy-of-copy in ClassFileParser::fetch_field_classes Changes: https://git.openjdk.org/valhalla/pull/2367/files Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2367&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8383242 Stats: 53 lines in 2 files changed: 43 ins; 0 del; 10 mod Patch: https://git.openjdk.org/valhalla/pull/2367.diff Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2367/head:pull/2367 PR: https://git.openjdk.org/valhalla/pull/2367
