missing memory barrier in acmp with C2
Andrew Haley
aph at redhat.com
Thu Oct 27 09:17:00 UTC 2016
On 26/10/16 19:48, Vitaly Davidovich wrote:
> So I see you took Hans' example, but his example has Thread 1 also
> reading some state during construction, which can be modified by
> Thread 2 concurrently. That is a problem, but your example was a
> bit too slimmed down to illustrate that.
Again, construction is a red herring. All the example says is that
the store to x.blah can become visible before the initialization of x.
This is not "initialization" in the sense of executing in a
constructor, which is safe before the address of the object is
published.
Andrew.
More information about the shenandoah-dev
mailing list