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

JVM crashes when executing PhaseIdealLoop::match_fill_loop



    • b35
    • generic
    • generic
    • Verified



        repoduce by running with
        `--add-modules=jdk.incubator.vector TestLoopStoreVector`

        Then we get crash like this:

        # A fatal error has been detected by the Java Runtime Environment:
        # Internal Error (/home/wanghuang/repo/jdk16/src/hotspot/share/runtime/stubRoutines.cpp:531), pid=79049, tid=79094
        # Error: ShouldNotReachHere()
        # JRE version: OpenJDK Runtime Environment (16.0) (slowdebug build 16-internal+0-adhoc.wanghuang.jdk16)
        # Java VM: OpenJDK 64-Bit Server VM (slowdebug 16-internal+0-adhoc.wanghuang.jdk16, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
        # Problematic frame:
        # V [libjvm.so+0x124d5d4] StubRoutines::select_fill_function(BasicType, bool, char const*&)+0x174
        # Core dump will be written. Default location: /home/wanghuang/bug/02/core.%e.79049.%t
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp

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

        Command Line: --add-modules=jdk.incubator.vector TestLoopStoreVector

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

        Current thread (0x0000fffec8266740): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=79094, stack(0x0000ffff0c9fe000,0x0000ffff0cbfe000)]

        Current CompileTask:
        C2: 2646 970 % 4 TestLoopStoreVector::test0 @ 2 (32 bytes)

        Stack: [0x0000ffff0c9fe000,0x0000ffff0cbfe000], sp=0x0000ffff0cbf7b40, free space=2022k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x124d5d4] StubRoutines::select_fill_function(BasicType, bool, char const*&)+0x174
        V [libjvm.so+0xea6434] PhaseIdealLoop::match_fill_loop(IdealLoopTree*, Node*&, Node*&, Node*&, Node*&)+0x420
        V [libjvm.so+0xea6fb8] PhaseIdealLoop::intrinsify_fill(IdealLoopTree*)+0x118
        V [libjvm.so+0xea5fec] PhaseIdealLoop::do_intrinsify_fill()+0x54
        V [libjvm.so+0xebb6c8] PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x117c
        V [libjvm.so+0x825ef8] PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, LoopOptsMode)+0xb8
        V [libjvm.so+0x825fc4] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x2c
        V [libjvm.so+0x81a2e8] Compile::Optimize()+0x984
        V [libjvm.so+0x8140ec] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xebc
        V [libjvm.so+0x6fe0ac] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x10c
        V [libjvm.so+0x82ffe0] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x788
        V [libjvm.so+0x82ed9c] CompileBroker::compiler_thread_loop()+0x378
        V [libjvm.so+0x12d4934] compiler_thread_entry(JavaThread*, Thread*)+0x84
        V [libjvm.so+0x12d07a4] JavaThread::thread_main_inner()+0x178
        V [libjvm.so+0x12d0618] JavaThread::run()+0x19c
        V [libjvm.so+0x12cc7b8] Thread::call_run()+0x19c
        V [libjvm.so+0x1024670] thread_native_entry(Thread*)+0x1e4
        C [libpthread.so.0+0x78bc] start_thread+0x19c

        The reason is :

          BasicType t = store->as_Mem()->memory_type();
          const char* fill_name;
          if (msg == NULL &&
              StubRoutines::select_fill_function(t, false, fill_name) == NULL) {
            msg = "unsupported store";
            msg_node = store;

        If the `store` is a `StoreVectorNode` ,the `BasicType` is `T_VOID`. It seems that we don't need to intrinsify a `StoreVectorNode` filling here.

        I add a new case here to avoid mistake:
          case T_NARROWOOP:
          case T_NARROWKLASS:
          case T_ADDRESS:
        + case T_VOID:
            // Currently unsupported
            return NULL;


          Issue Links



                whuang Wang Huang
                whuang Wang Huang
                0 Vote for this issue
                9 Start watching this issue