[aarch64-port-dev ] RFR(s): 8171449" [aarch64] store_klass needs to use store release

Thomas Schatzl thomas.schatzl at oracle.com
Fri Dec 23 13:44:07 UTC 2016


Hi,

On Fri, 2016-12-23 at 13:35 +0000, Andrew Haley wrote:
> On 23/12/16 12:31, Thomas Schatzl wrote:
> > 
> > I hope this answers your question.
> > 
> > Given this I tend to think that there is no issue here after all,
> > but
> > please by all means, verify this.
> OK.  I'm going to step through to see if that is what really happens.
> I'm pretty sure that when I did step through I didn't see any NULLing
> of the klass field, but I take it from your answer that the only time
> this actually needs to happen is when an object is allocated by the
> C++ runtime code, not by the JIT-generated code or the JIT's runtime
> libraries, which only ever allocated in the young gen.

The important thing to consider here is that the FreeChunk data
structure is overlaid over the future object. I.e. when
FreeChunk::mark_not_free() is called, by nulling out _prev, it actually
also nulls out the klass field of the future object.

There is actually a comment indicating exactly that in that method.

Thanks,
  Thomas



More information about the aarch64-port-dev mailing list