RFR: 8225716: G1 GC: Undefined behaviour in G1BlockOffsetTablePart::block_at_or_preceding
kim.barrett at oracle.com
Fri Jun 14 19:32:32 UTC 2019
> On Jun 14, 2019, at 11:23 AM, Andrew Haley <aph at redhat.com> wrote:
> On 6/14/19 1:06 PM, Thomas Schatzl wrote:
>> Btw, please push the final fix into the jdk/jdk13 repos (I assume we
>> will manage reviewing this in time ;)). In any case this is serious
>> enough to get it into the product asap.
> Here, with all comments in this thread take into account:
> One thing which gave me pause was the need to cast away const when
> calling memset_with_concurrent_readers(). I don't think it's actually
> wrong, given that memset_with_concurrent_readers() has the
> specification we need: we don't need strict volatile behaviour in the
> sense of ordering. We just need to be sure that there are no
> intermediate values other than what we ask for.
I think it's probably a bug that memset_with_concurrent_readers
doesn't take a pointer to volatile buffer or doesn't have an
appropriate overload. Of course, that function ought to be merged
into Copy::fill_to_memory_atomic (see JDK-8142349). It's probably a
bug that the Copy::*_atomic functions don't provide support for
volatile buffers. I'm okay with the const_cast here.
More information about the hotspot-gc-dev