diff --git a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapScanner.java b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapScanner.java index 748ea8d5ac6e..af9a53bc5b6b 100644 --- a/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapScanner.java +++ b/substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapScanner.java @@ -336,7 +336,9 @@ private ImageHeapArray createImageHeapObjectArray(JavaConstant constant, Analysi /* Read hosted array element values only when the array is initialized. */ array.constantData.hostedValuesReader = new AnalysisFuture<>(() -> { checkSealed(reason, "Trying to materialize an ImageHeapObjectArray for %s after the ImageHeapScanner is sealed.", constant); - try (var ignored = CausalityExport.setCause(CausalityEvents.Ignored)) { // TODO + var inHeap = CausalityEvents.TypeInHeap.create(type); + CausalityExport.registerEdgeFromHeapObject(bb, constant, reason, inHeap); + try (var ignored = CausalityExport.setCause(inHeap)) { type.registerAsReachable(reason); } Object[] elementValues = new Object[length];