On Mon, 27 Apr 2026 08:47:30 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> Per Minborg has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Change the way throwing toString is handled
>
> src/java.base/share/classes/java/lang/LazyConstant.java line 159:
> 
>> 157:  * the initialized constant's content is read. Hence, the initialized 
>> constant's content,
>> 158:  * including any {@code final} fields of any newly created objects, is 
>> safely published.
>> 159:  * As reading of the content might be elided, there are no other memory 
>> ordering or
> 
> I find this sentence a bit odd -- you say in the para above that the content 
> of the LC are safely published -- which implies there is at least some memory 
> ordering between initialization and a get that sees the initialized value (or 
> an error state). It seems to me this new para applies more to subsequent 
> reads?

I wonder if this sentence is necessary in general—perhaps we could just drop it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30194#discussion_r3146165054

Reply via email to