On Tue, 28 Apr 2026 13:00:59 GMT, Stefan Karlsson <[email protected]> wrote:

>> Hi all,
>> 
>> This decouples the `AlwaysAtomicAccesses` flag from layouts in Valhalla.
>> 
>> It also fixes a broken assertion that had gone unnoticed due to 
>> `AlwaysAtomicAccesses` being falsy.
>> 
>> Testing: tiers 1-3. 
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/hotspot/share/oops/flatArrayKlass.cpp line 107:
> 
>> 105:   assert(MultiArray_lock->holds_lock(THREAD), "must hold lock after 
>> bootstrapping");
>> 106:   assert(props.is_null_restricted() || !props.is_non_atomic(),
>> 107:          "Null-restricted nonatomic arrays are unsupported");
> 
> Suggestion:
> 
>          "Null-restricted non-atomic arrays are unsupported");

To me it looks like this assert allows null-restricted non-atomic arrays. I 
think something is missing here.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2366#discussion_r3154323191

Reply via email to