-
Bug
-
Resolution: Fixed
-
P3
-
11, 17, 20, 21, 22
-
(Reproduced with OpenJDK 64-Bit Server VM (build 21-ea+26-2328, mixed mode, sharing))
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311329 | 21.0.1 | Tobias Hartmann | P3 | Resolved | Fixed | b02 |
JDK-8310602 | 21 | Tobias Hartmann | P3 | Resolved | Fixed | b29 |
JDK-8311793 | 17.0.9-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b02 |
JDK-8311037 | 17.0.9 | Aleksey Shipilev | P3 | Resolved | Fixed | b01 |
The following code segfaults in C1 compiled tier 1 code with graal (only the tier 1 version crashes, the tier 3 compile of it does not).
#############################
import java.lang.ref.WeakReference;
import java.math.MathContext;
class T {
int f() {
int q = 43837, p;
MathContext u = null;
for (int w = 648; w < 9230; w += 1)
try {
p = u.getPrecision();
} catch (Throwable x) {
} finally {
}
WeakReference r = null;
try {
while (r.get() != null) {}
} catch (Throwable x) {
} finally {
}
return (int) (long) q;
}
public static void main(String[] g) {
T t = new T();
for (; ; ) t.f();
}
}
#############################
Reproduce with /jdk-21/bin/java -XX:TieredStopAtLevel=1 T1
Does not crash with regular tiered compilation because c2 compile of this is fine. Crashes with Graal because graal does not OSR compile this loop because the call target method of u.getPrecision(); is not resolved (in fact its always null and throws). MDO has exception seen but no profile so graal rejects OSR. This leads to C1 tier 1 compile of it which fails. Simulate with stop at tier 1 to fault immediately. Theoretically if a similar example would trigger C2 rejecting compile of such an example this could lead to a tier 1 compile of it without graal and expose the problem as well.
- backported by
-
JDK-8310602 C1: Missing receiver null check in Reference::get intrinsic
- Resolved
-
JDK-8311037 C1: Missing receiver null check in Reference::get intrinsic
- Resolved
-
JDK-8311329 C1: Missing receiver null check in Reference::get intrinsic
- Resolved
-
JDK-8311793 C1: Missing receiver null check in Reference::get intrinsic
- Resolved
- relates to
-
JDK-8201543 Modularize C1 GC barriers
- Resolved
- links to
-
Commit openjdk/jdk17u-dev/95b4ddc7
-
Commit openjdk/jdk21/89ac41be
-
Commit openjdk/jdk/02aaab12
-
Review openjdk/jdk17u-dev/1474
-
Review openjdk/jdk21/51
-
Review openjdk/jdk/14511