-
Bug
-
Resolution: Unresolved
-
P3
-
25
-
x86_64
-
linux_ubuntu
ADDITIONAL SYSTEM INFORMATION :
java -version
openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.user.jdk)
OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.user.jdk, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When I used the JVM compiled from the OpenJDK source code obtained from GitHub to run the following code, the JVM crashed. After enabling the -Xint option to disable JIT, the issue no longer occurred. Based on the location of the assert, we suspect that there is a bug in the C2 compiler of the JIT.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test.java & java Test
ACTUAL -
A crash may occur during runtime (about once in every three runs).
---------- BEGIN SOURCE ----------
class Test {
static int[] iArrFld = new int[400];
static int method9() {
int[] more = { 94 };
java.util.function.Predicate<Integer> check = m -> m == 0;
java.util.function.IntConsumer decrement = x -> more[0]--;
java.util.function.BooleanSupplier innerLoop = () -> {
while (!check.test(more[0]))
decrement.accept(0);
return true;
};
innerLoop.getAsBoolean();
java.util.function.BooleanSupplier process = () -> check.test(more[0]);
while (!process.getAsBoolean()) {
}
return 0;
}
public static void main(String[] strArr) {
int i14 = 1;
do {
iArrFld[i14] = 211;
for (int i15 = 1; i15 < 4; ++i15)
i14 = Test.method9();
} while (i14 < 5);
}
}
---------- END SOURCE ----------
java -version
openjdk version "25-internal" 2025-09-16
OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.user.jdk)
OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.user.jdk, mixed mode)
A DESCRIPTION OF THE PROBLEM :
When I used the JVM compiled from the OpenJDK source code obtained from GitHub to run the following code, the JVM crashed. After enabling the -Xint option to disable JIT, the issue no longer occurred. Based on the location of the assert, we suspect that there is a bug in the C2 compiler of the JIT.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test.java & java Test
ACTUAL -
A crash may occur during runtime (about once in every three runs).
---------- BEGIN SOURCE ----------
class Test {
static int[] iArrFld = new int[400];
static int method9() {
int[] more = { 94 };
java.util.function.Predicate<Integer> check = m -> m == 0;
java.util.function.IntConsumer decrement = x -> more[0]--;
java.util.function.BooleanSupplier innerLoop = () -> {
while (!check.test(more[0]))
decrement.accept(0);
return true;
};
innerLoop.getAsBoolean();
java.util.function.BooleanSupplier process = () -> check.test(more[0]);
while (!process.getAsBoolean()) {
}
return 0;
}
public static void main(String[] strArr) {
int i14 = 1;
do {
iArrFld[i14] = 211;
for (int i15 = 1; i15 < 4; ++i15)
i14 = Test.method9();
} while (i14 < 5);
}
}
---------- END SOURCE ----------