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

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Nov 27 08:17:21 EST 2013


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