Take 4: 8225716: G1 GC: Undefined behaviour in G1BlockOffsetTablePart::block_at_or_preceding

Andrew Haley aph at redhat.com
Tue Jun 18 15:20:24 UTC 2019

Please.  :-)


On 6/18/19 3:48 PM, Andrew Haley wrote:
> On 6/17/19 9:20 PM, Thomas Schatzl wrote:
>>> It *might* be a (pre-existing) bug that the heap memory range
>>> predicates don't accept pointer to volatile. But looking at the
>>> asserts you needed to fix, my reaction is to question their utility,
>>> and wonder if they should just be removed.  What do others think?
>>   not seeing that they are particularly useful, so good to just remove
>> to me too.
> OK.
> I take it, though, that we still need the check_index() in
> void G1BlockOffsetTable::set_offset_array(size_t index, u_char offset) {
>   check_index(index, "index out of range");
>   Atomic::store(offset, &_offset_array[index]);
> }
> ... and therefore we're still going to need a raw version of
> set_offset_array() because zero_bottom_entry_raw() is called before the
> HeapRegion is initialized, and therefore check_index() will fail.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-gc-dev mailing list