ADDITIONAL SYSTEM INFORMATION :
Arch: x86_64
OS: Ubuntu 20.04
Java:
- openjdk version "11.0.17-internal" 2022-10-18
- OpenJDK Runtime Environment (fastdebug build 11.0.17-internal+0-adhoc.congli.jdk11u-dev)
- OpenJDK 64-Bit Server VM (fastdebug build 11.0.17-internal+0-adhoc.congli.jdk11u-dev, mixed mode)
Release:
```
IMPLEMENTOR="N/A"
JAVA_VERSION="11.0.17"
JAVA_VERSION_DATE="2022-10-18"
LIBC="gnu"
MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.vm.ci jdk.management jdk.unsupported jdk.internal.vm.compiler jdk.aot jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.ldap jdk.naming.rmi jdk.net jdk.pack jdk.rmic jdk.scripting.nashorn jdk.scripting.nashorn.shell jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom jdk.zipfs"
OS_ARCH="x86_64"
OS_NAME="Linux"
SOURCE=".:git:74daa996b521"
```
Javac: javac 11.0.17-internal
A DESCRIPTION OF THE PROBLEM :
This is a JIT compiler bug triggering an assertion failure in the C2 compiler:
# Internal Error (/zdata/congli/hotspot-build-env/jdk11u-dev/src/hotspot/share/opto/loopnode.cpp:2925), pid=2522998, tid=2523010
# assert(_ltree_root->_child == __null || C->has_loops() || only_has_infinite_loops() || C->has_exception_backedge()) failed: parsing found no loops but there are some
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. javac T.java
2. java -Xmx1G -XX:-BackgroundCompilation -XX:-PrintWarnings --illegal-access=deny T
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
NO crash
ACTUAL -
Crashed
---------- BEGIN SOURCE ----------
import java.net.Socket;
class T {
long l;
void q() {
if (b) {
Socket s = new Socket();
return;
}
do {
l++;
while (l != 1) --l;
l = 9;
} while (l != 5);
}
public static void main(String[] p) {
T t = new T();
for (int i = 524; i < 19710; i += 1) {
b = true;
t.q();
b = false;
}
t.q();
}
static Boolean b;
}
---------- END SOURCE ----------
FREQUENCY : always