diff -r 17778f8991c8 -r cfe3264deba4 src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp --- a/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Wed Jun 05 05:15:56 2019 +0100 +++ b/src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp Wed Jun 19 16:36:26 2019 +0100 @@ -63,6 +63,10 @@ return _offset_array[index]; } +inline void G1BlockOffsetSharedArray::set_offset_array_raw(size_t index, u_char offset) { + _offset_array[index] = offset; +} + void G1BlockOffsetSharedArray::set_offset_array(size_t index, u_char offset) { check_index(index, "index out of range"); set_offset_array_raw(index, offset); @@ -81,7 +85,7 @@ assert(left <= right, "indexes out of order"); size_t num_cards = right - left + 1; if (UseMemSetInBOT) { - memset(&_offset_array[left], offset, num_cards); + memset(const_cast (&_offset_array[left]), offset, num_cards); } else { size_t i = left; const size_t end = i + num_cards;