Fatal "dead path discovered by TypeNode during igvn" after C2 compilation

XMLWordPrintable

    • b23
    • 26

      Found by Olivier Mattmann <olivier.mattmann@bluewin.ch> during work on this Master thesis where he is working on a fuzzer for C2 (see JDK-8370562).

      The attached test case fails on debug builds with the following assert when the test method is compiled with C2:
      build/linux-x64-fastdebug/jdk/bin java -Xbatch -XX:-TieredCompilation Test.java

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (open/src/hotspot/cpu/x86/macroAssembler_x86.cpp:442), pid=534782, tid=534783
      # fatal error: DEBUG MESSAGE: dead path discovered by TypeNode during igvn
      #
      # JRE version: Java(TM) SE Runtime Environment (27.0) (fastdebug build 27-internal-mhassig.open)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-internal-mhassig.open, mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x160e3e5] MacroAssembler::debug64(char*, long, long*)+0x45
      #


      --------------- S U M M A R Y ------------

      Command Line: -Xbatch -XX:-TieredCompilation -XX:CompileCommand=printcompilation,*.* --add-modules=ALL-DEFAULT jdk.compiler/com.sun.tools.javac.launcher.SourceLauncher Test.java

      Host: Intel(R) Core(TM) Ultra 9 185H, 22 cores, 61G, Oracle Linux Server release 9.7
      Time: Wed Jan 28 13:33:40 2026 CET elapsed time: 3.263954 seconds (0d 0h 0m 3s)

      --------------- T H R E A D ---------------

      Current thread (0x00007fb3c802cdc0): JavaThread "main" [_thread_in_Java, id=534783, stack(0x00007fb3cf900000,0x00007fb3cfa00000) (1024K)]

      Stack: [0x00007fb3cf900000,0x00007fb3cfa00000], sp=0x00007fb3cf9fe310, free space=1016k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x160e3e5] MacroAssembler::debug64(char*, long, long*)+0x45 (macroAssembler_x86.cpp:442)

      The error manifests a bit differently on aarch64, since the assert is in the macroAssembler, but it also reproduces reliably.

        1. TestReduced.java
          4 kB
        2. Test.java
          13 kB
        3. hs_err_x64.log
          76 kB
        4. hs_err_aarch64.log
          109 kB

            Assignee:
            Roland Westrelin
            Reporter:
            Manuel Hässig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: