[lworld] RFR: 8367785: [lworld] Compiler adherence to new memory model rules for strict instance fields
Christian Hagedorn
chagedorn at openjdk.org
Mon Oct 6 08:22:21 UTC 2025
On Mon, 6 Oct 2025 08:11:57 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestStrictFieldBarriers.java line 204:
>>
>>> 202: if (res != 1) {
>>> 203: System.err.println("Incorrect field value observed!");
>>> 204: System.exit(1);
>>
>> Is there any particular reason why you don't throw a `RuntimeException` here instead?
>
> Yes, it's the best way (I think) to make sure all threads immediately exit if one thread observes an error. Throwing an exception will not stop the other threads.
Got it, thanks for the explanation!
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1656#discussion_r2405299704
More information about the valhalla-dev
mailing list