8386707: [BACKOUT] ZGC: Incorrect object undo in relocation race for relocation workers

Reviewed-by: stefank, aboldtch
This commit is contained in:
Joel Sikström 2026-06-16 13:46:47 +00:00
parent 8de834cd8a
commit cba3017047

View File

@ -642,7 +642,7 @@ private:
const zaddress to_addr = _forwarding->insert(from_addr, allocated_addr, &cursor);
if (to_addr != allocated_addr) {
// Already relocated, undo allocation
_allocator->undo_alloc_object(to_page, allocated_addr, size);
_allocator->undo_alloc_object(to_page, to_addr, size);
increase_other_forwarded(size);
}