[lworld] C2 fails with assert(_gvn.type(n) == TypePtr::NULL_PTR) failed: must be a null constant

XMLWordPrintable

      Looks like a regression from JDK-8377803.

      java -Xbatch --enable-preview -XX:-TieredCompilation -XX:CompileCommand=compileonly,Test::test Test.java

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/open/src/hotspot/share/opto/parse1.cpp:1871), pid=3621752, tid=3621769
      # assert(_gvn.type(n) == TypePtr::NULL_PTR) failed: must be a null constant
      #
      # JRE version: Java(TM) SE Runtime Environment (27.0+1) (fastdebug build 27-valhalla+1-168)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-valhalla+1-168, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x195996a] Parse::merge_common(Parse::Block*, int)+0x178a
      #

      Current CompileTask:
      C2:1368 106 b Test::test (48 bytes)

      Stack: [0x00007feb533a7000,0x00007feb534a7000], sp=0x00007feb534a34d0, free space=1009k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x195996a] Parse::merge_common(Parse::Block*, int)+0x178a (parse1.cpp:1871)
      V [libjvm.so+0x195b640] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x195ede4] Parse::Parse(JVMState*, ciMethod*, float)+0xac4
      V [libjvm.so+0xa13e85] ParseGenerator::generate(JVMState*)+0x135
      V [libjvm.so+0xc23355] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x15e5
      V [libjvm.so+0xa10988] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4b8
      V [libjvm.so+0xc3384f] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xbcf
      V [libjvm.so+0xc34a90] CompileBroker::compiler_thread_loop()+0x530
      V [libjvm.so+0x120482b] JavaThread::thread_main_inner()+0x13b
      V [libjvm.so+0x1cf1816] Thread::call_run()+0xb6
      V [libjvm.so+0x19060b8] thread_native_entry(Thread*)+0x118

        1. Test.java
          2 kB
          Tobias Hartmann

            Assignee:
            Quan Anh Mai
            Reporter:
            Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: