Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk21 Public archive

Commit 55aa4cb

Browse files
committed
8309498: [JVMCI] race in CallSiteTargetValue recording
Reviewed-by: chagedorn, dlong Backport-of: bb96682
1 parent 5357bcd commit 55aa4cb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Diff for: src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotObjectConstantImpl.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ public JavaConstant getCallSiteTarget(Assumptions assumptions) {
8888
if (runtime().getCallSite().isInstance(this)) {
8989
// For ConstantCallSites, we need to read "isFrozen" before reading "target"
9090
// isFullyInitializedConstantCallSite() reads "isFrozen"
91-
if (!isFullyInitializedConstantCallSite()) {
92-
if (assumptions == null) {
93-
return null;
94-
}
95-
assumptions.record(new Assumptions.CallSiteTargetValue(this, readTarget()));
91+
if (isFullyInitializedConstantCallSite()) {
92+
return readTarget();
9693
}
97-
return readTarget();
94+
if (assumptions == null) {
95+
return null;
96+
}
97+
HotSpotObjectConstantImpl result = readTarget();
98+
assumptions.record(new Assumptions.CallSiteTargetValue(this, result));
99+
return result;
98100
}
99101
return null;
100102
}

0 commit comments

Comments
 (0)