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

C2: assert(false) failed: should not be here

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      ADDITIONAL SYSTEM INFORMATION :
      $ <JAVA_HOME>/bin/java -version
      openjdk version "25-internal" 2025-09-16
      OpenJDK Runtime Environment (fastdebug build 25-internal-adhoc.user.jdk-mainline)
      OpenJDK 64-Bit Server VM (fastdebug build 25-internal-adhoc.user.jdk-mainline, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      When running the following code, the JDK crashes with the error message: assert(false) failed: should not be here. The code we provide is a minimized Java test case that reproduces the issue.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      javac Test.java && java Test

      ACTUAL -
       1912 StrEquals === 1911 2275 1899 1902 714 [[ 2036 ]] !orig=[2034] !jvms: String::equals @ bci:44 (line 1921) Ce::cem @ bci:40 (line 20)
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (<JDK-REPO>/hotspot/jdk-24/src/hotspot/share/opto/escape.cpp:4083), pid=2202139, tid=2202163
      # assert(false) failed: should not be here
      #
      # JRE version: OpenJDK Runtime Environment (25.0) (fastdebug build 25-internal-adhoc.qiusy.jdk-24)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 25-internal-adhoc.qiusy.jdk-24, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xd2382b] ConnectionGraph::move_inst_mem(Node*, GrowableArray<PhiNode*>&)+0x8eb
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to <FOLDER>/Test0789_05_15_11_23_30/reduce/core.2202139)
      #
      # An error report file with more information is saved as:
      # <FOLDER>/Test0789_05_15_11_23_30/reduce/hs_err_pid2202139.log
      #
      # Compiler replay data is saved as:
      # <FOLDER>/Test0789_05_15_11_23_30/reduce/replay_pid2202139.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #
      bash: line 1: 2202139 Aborted (core dumped) <JDK-REPO>/hotspot/jdk-24/build/linux-x86_64-server-fastdebug/jdk/bin/java -cp . Test


      ---------- BEGIN SOURCE ----------
      class Test extends c159.HelperBase {
          public static void main(String[] strArr) {
              for (int var16 = 0; var16 < 100000; var16++) {
                  Ce.VALUE2.cem("123456abc", "123456abc");
              }
          }
      }

      enum Ce {
          VALUE2;

          int cem(String id, String nameKey) {
              try {
                  java.io.ByteArrayOutputStream stream = new java.io.ByteArrayOutputStream();
                  java.math.BigInteger num = java.math.BigInteger.valueOf(123);
                  int length = num.toByteArray().length;
                  stream.write(num.toByteArray());
              } catch (Exception e) {
              }
              if ("UTC".equals(id) && id.equals(nameKey))
                  ;
              return 0;
          }
      }

      class c159 {
          static class HelperBase {
          }
      }

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

            dskantz Daniel Skantz
            mcadizolivar Mario Cadiz Olivares
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: