Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8293996

C2: fix and simplify IdealLoopTree::do_remove_empty_loop

XMLWordPrintable

    • b17

        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)

        javac: javac 11.0.17-internal


        A DESCRIPTION OF THE PROBLEM :
        This is a JIT compiler bug which triggers an assertion failure in the C2 compiler:

        # Internal Error (/zdata/congli/hotspot-build-env/jdk11u-dev/src/hotspot/share/opto/loopnode.cpp:1606), pid=2489456, tid=2489469
        # assert(false) failed: should be able to adjust outer loop

        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 ----------
        class T {
          long b;

          void a(double d) {
            int e;
            int w = 43542;
            int o = 11;
            e = w;
            for (int i = 524; i < 19325; i += 1) {
              for (int j = 0; j < 32767; j++) o++;
              for (int k = 0; k < o; k++) e += 7;
            }
          }

          void p(long l, float f, long l1) {
            double z = 83.31189;
            for (; ; ) a(z);
          }

          void f() {
            p(b, 93.934F, b);
          }

          public static void main(String[] q) {
            T t = new T();
            t.f();
          }
        }

        ---------- END SOURCE ----------

        FREQUENCY : always


          1. T.java
            0.5 kB
          2. replay_pid18980.log
            94 kB
          3. hs_err_pid18980.log
            52 kB

              epeter Emanuel Peter
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: