From 63db1b14b87781fccf0a6cd905e2f732fb1dbedd Mon Sep 17 00:00:00 2001 From: lhu Date: Mon, 13 Jan 2025 12:13:22 -0500 Subject: [PATCH] Fix potential issue in initializing unsafeIndexableHeaderSize default setting unsafeIndexableHeaderSize is only covered IndexableObjectWithoutDataAddress case, so for Balanced GC Off heap disabled case, there is potentially missing to set unsafeIndexableHeaderSize, change to set default unsafeIndexableHeaderSize for both w/wo DataAddress cases. Signed-off-by: lhu --- runtime/gc_modron_startup/mminit.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/runtime/gc_modron_startup/mminit.cpp b/runtime/gc_modron_startup/mminit.cpp index c6d0fa83c7b..90dc4b2719a 100644 --- a/runtime/gc_modron_startup/mminit.cpp +++ b/runtime/gc_modron_startup/mminit.cpp @@ -3325,11 +3325,8 @@ initializeIndexableObjectHeaderSizes(J9JavaVM* vm) #else /* defined(J9VM_ENV_DATA64) */ setIndexableObjectHeaderSizeWithoutDataAddress(vm); #endif /* defined(J9VM_ENV_DATA64) */ - if (MM_GCExtensions::getExtensions(vm)->isVirtualLargeObjectHeapEnabled) { - vm->unsafeIndexableHeaderSize = 0; - } else { - vm->unsafeIndexableHeaderSize = vm->contiguousIndexableHeaderSize; - } + /* set default unsafeIndexableHeaderSize */ + vm->unsafeIndexableHeaderSize = vm->contiguousIndexableHeaderSize; } #if defined(J9VM_ENV_DATA64) @@ -3356,7 +3353,6 @@ setIndexableObjectHeaderSizeWithoutDataAddress(J9JavaVM* vm) vm->contiguousIndexableHeaderSize = sizeof(J9IndexableObjectContiguousFull); vm->discontiguousIndexableHeaderSize = sizeof(J9IndexableObjectDiscontiguousFull); } - vm->unsafeIndexableHeaderSize = vm->contiguousIndexableHeaderSize; } #if defined(OMR_GC_CONCURRENT_SCAVENGER)