8237847: Zero builds fail after JDK-8237637 (Remove dubious type conversions from oop)

Reviewed-by: dcubed
This commit is contained in:
Aleksey Shipilev 2020-01-26 17:08:40 +01:00
parent 49dc57cd10
commit 7cae6c3564

View File

@ -2173,7 +2173,7 @@ run:
if (result != NULL) {
// Initialize object (if nonzero size and need) and then the header
if (need_zero ) {
HeapWord* to_zero = (HeapWord*) result + sizeof(oopDesc) / oopSize;
HeapWord* to_zero = cast_from_oop<HeapWord*>(result) + sizeof(oopDesc) / oopSize;
obj_size -= sizeof(oopDesc) / oopSize;
if (obj_size > 0 ) {
memset(to_zero, 0, obj_size * HeapWordSize);