[concurrency-interest] Volatile stores in constructors, disallowed to see the default value

Oleksandr Otenko oleksandr.otenko at oracle.com
Wed Nov 27 08:32:41 EST 2013

That is actually my point - I don't have a pointer to JLS where that 
restriction would be there. Until then you have no proof that 
store(a,r2) is strictly after store(r2.f,42).


On 27/11/2013 13:17, Aleksey Shipilev wrote:
> Hi Oleksandr,
> On 11/27/2013 05:13 PM, Oleksandr Otenko wrote:
>> The actual instructions on the left are:
>> r2=new A();
>> r2.f=42;
>> a=r2;
>> You have no mention of store(a) being strictly after store(a.f,42) in
>> your reasoning; which is I think what Doug means by "final field"
>> semantics.
> Yeah, traces are implying this order there, see the program order
> constraints.
>> If JLS already mentions that constructors with volatile stores in them
>> are treated differently, then there is no ambiguity already.
> Hm. Care to share the exact pointer?
> -Aleksey.

More information about the Concurrency-interest mailing list