<div><p style="font-size:50px;margin-top:0;margin-bottom:0">💖</p><p style="margin-top:10px;margin-bottom:0">David reacted via <a style="color:unset;text-decoration:underline" href="https://www.google.com/gmail/about/?utm_source=gmail-in-product&utm_medium=et&utm_campaign=emojireactionemail#app">Gmail</a></p></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Nov 7, 2025, 10:13 AM Frederic Parain <<a href="mailto:frederic.parain@oracle.com">frederic.parain@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here's a write-up from John Rose on this subject:<br>
<br>
<a href="https://cr.openjdk.org/~jrose/values/NullabilityRequiresConsistency.java.txt" rel="noreferrer noreferrer" target="_blank">https://cr.openjdk.org/~jrose/values/NullabilityRequiresConsistency.java.txt</a><br>
<br>
Fred<br>
<br>
<br>
On 11/7/25 05:39, Tobias Hartmann wrote:<br>
> Right, the example provided by Rémi shows the issue. The null marker <br>
> needs to be written atomically with the payload.<br>
><br>
> Best regards,<br>
> Tobias<br>
><br>
><br>
> On 11/6/25 2:02 PM, Remi Forax wrote:<br>
>> Hello,<br>
>> as far as i remember, the problem is that you can resurrect a value,<br>
>> for example with a Long<br>
>><br>
>> Thread1<br>
>> Â Â a.x = new Long(12);<br>
>> Â Â a.x = null;<br>
>> Â Â IO.println(a.x); //12<br>
>><br>
>> Thread2<br>
>> Â Â IO.println(a.x);Â // null<br>
>> Â Â a.x = new Long(77);Â Â // descheduled in between writing the maker <br>
>> and writing the long<br>
>><br>
>><br>
>> The thread1 can see the Long(12) to be resurrected, something that is <br>
>> not possible with references.<br>
>><br>
>> regards,<br>
>> Rémi<br>
>><br>
>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ <br>
>><br>
>><br>
>>    *From: *"Quân Anh Mai" <<a href="mailto:anhmdq@gmail.com" target="_blank" rel="noreferrer">anhmdq@gmail.com</a>><br>
>> Â Â Â *To: *"David Alayachew" <<a href="mailto:davidalayachew@gmail.com" target="_blank" rel="noreferrer">davidalayachew@gmail.com</a>><br>
>> Â Â Â *Cc: *"valhalla-dev" <<a href="mailto:valhalla-dev@openjdk.org" target="_blank" rel="noreferrer">valhalla-dev@openjdk.org</a>><br>
>> Â Â Â *Sent: *Thursday, November 6, 2025 3:52:41 AM<br>
>> Â Â Â *Subject: *Re: About flattening a nullable j.l.Long<br>
>><br>
>> Â Â Â Ah yes, my bad, it is <br>
>> <a href="https://github.com/openjdk/valhalla/pull/1720" rel="noreferrer noreferrer" target="_blank">https://github.com/openjdk/valhalla/pull/1720</a> <br>
>> <<a href="https://github.com/openjdk/valhalla/pull/1720" rel="noreferrer noreferrer" target="_blank">https://github.com/openjdk/valhalla/pull/1720</a>><br>
>><br>
>> Â Â Â On Thu, 6 Nov 2025 at 07:26, David Alayachew <br>
>> <<a href="mailto:davidalayachew@gmail.com" target="_blank" rel="noreferrer">davidalayachew@gmail.com</a> <mailto:<a href="mailto:davidalayachew@gmail.com" target="_blank" rel="noreferrer">davidalayachew@gmail.com</a>>> wrote:<br>
>><br>
>> Â Â Â Â Â Â Â Just a heads up, your [1] is a dead link. Can you try to put <br>
>> the url in again?<br>
>><br>
>>        On Wed, Nov 5, 2025, 2:06 PM Quân Anh Mai <<a href="mailto:anhmdq@gmail.com" target="_blank" rel="noreferrer">anhmdq@gmail.com</a> <br>
>> <mailto:<a href="mailto:anhmdq@gmail.com" target="_blank" rel="noreferrer">anhmdq@gmail.com</a>>> wrote:<br>
>><br>
>> Â Â Â Â Â Â Â Â Â Â Â Hi,<br>
>> Â Â Â Â Â Â Â Â Â Â Â Currently, I'm having a PR that allows flattening of a <br>
>> nullable value class with a 64-bit payload [1]. Dan Smith told me <br>
>> that some ideas along these lines were discussed a few years ago, and <br>
>> the consensus was that it was a dead end. May I ask what the concerns <br>
>> were, and whether they are still relevant now?<br>
>><br>
>> Â Â Â Â Â Â Â Â Â Â Â Thanks a lot,<br>
>> Â Â Â Â Â Â Â Â Â Â Â Quan Anh<br>
>><br>
>><br>
><br>
</blockquote></div>