JDK-8257574 : C2: "failed: parsing found no loops but there are some" assert failure
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-02
  • Updated: 2022-09-23
  • Resolved: 2020-12-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16
11.0.12-oracleFixed 16 b28Fixed
Related Reports
Relates :  
Relates :  
Description
#  Internal Error (/home/roland/jdk-jdk/src/hotspot/share/opto/loopnode.cpp:3752), pid=1215493, tid=1215508
#  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

from a CTW run. Also reproducible with:

/**
 * @test
 *
 * @run main/othervm -Xcomp -XX:CompileOnly=TestInfiniteLoopNotInnerMost::test TestInfiniteLoopNotInnerMost
 *
 */
public class TestInfiniteLoopNotInnerMost {
    public static void main(String[] args) {
        test(false);
    }

    private static void test(boolean flag) {
        if (flag) {
            while (true) {
                for (int i = 1; i < 100; i *= 2) {

                }
            }
        }
    }
}
Comments
Fix Request (11u) Should get backported for parity with 11.0.12-oracle. Doesn't apply cleanly. Review thread: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2021-March/005364.html
18-03-2021

ILW = Harmless assert during C2 compilation, reproducible with simple test, no workaround but disable compilation = MMM = P3
04-12-2020

Changeset: 86b65756 Author: Roland Westrelin <roland@openjdk.org> Date: 2020-12-04 12:01:53 +0000 URL: https://git.openjdk.java.net/jdk/commit/86b65756
04-12-2020