From c36bf4354b9b47d7ad26fd39b8360498ac8283a7 Mon Sep 17 00:00:00 2001 From: Michal Karm Babacek Date: Thu, 26 Oct 2023 11:59:01 +0200 Subject: [PATCH] Fixes issue-7652 for epsilon gc --- .../src/com/oracle/svm/core/genscavenge/HeapImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/HeapImpl.java b/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/HeapImpl.java index a40439af6920..2374e7bb7e38 100644 --- a/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/HeapImpl.java +++ b/substratevm/src/com.oracle.svm.core.genscavenge/src/com/oracle/svm/core/genscavenge/HeapImpl.java @@ -691,7 +691,7 @@ public long getThreadAllocatedMemory(IsolateThread thread) { @Override @Uninterruptible(reason = "Ensure that no GC can occur between modification of the object and this call.", callerMustBe = true) public void dirtyAllReferencesOf(Object obj) { - if (obj != null) { + if (SubstrateOptions.useRememberedSet() && obj != null) { ForcedSerialPostWriteBarrier.force(OffsetAddressNode.address(obj, 0), false); } }