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

C2: assert(cl->trip_count() > 0) failed: peeling a fully unrolled loop

    XMLWordPrintable

Details

    • b17
    • 15
    • b25

    Backports

      Description

        The attached fuzzer test fails with the following assertion:

        To reproduce:
        $ java -Xbatch -Xmx1G Test.java 

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/christian/jdk/open/src/hotspot/share/opto/loopTransform.cpp:692), pid=6413, tid=6425
        # assert(cl->trip_count() > 0) failed: peeling a fully unrolled loop
        #
        # JRE version: Java(TM) SE Runtime Environment (16.0) (slowdebug build 16-internal+0-2020-10-16-0945385.christian...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 16-internal+0-2020-10-16-0945385.christian..., mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0xde6d8f] PhaseIdealLoop::do_peeling(IdealLoopTree*, Node_List&)+0xe5
        ..........
        Command Line: -Xbatch -Xmx1G --add-modules=ALL-DEFAULT jdk.compiler/com.sun.tools.javac.launcher.Main Test.java
        ..........
        Current thread (0x00007f9700341550): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=6425, stack(0x00007f96e0fcb000,0x00007f96e10cc000)]


        Current CompileTask:
        C2: 30156 2168 b 4 Test::lMeth (242 bytes)

        Stack: [0x00007f96e0fcb000,0x00007f96e10cc000], sp=0x00007f96e10c5f10, free space=1003k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0xde6d8f] PhaseIdealLoop::do_peeling(IdealLoopTree*, Node_List&)+0xe5
        V [libjvm.so+0xdf2bbf] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x4f5
        V [libjvm.so+0xdf2ce7] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x10b
        V [libjvm.so+0xdf2c18] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x3c
        V [libjvm.so+0xdf2d85] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x1a9
        V [libjvm.so+0xdf2d85] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x1a9
        V [libjvm.so+0xdf2c18] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x3c
        V [libjvm.so+0xe06455] PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0x1517
        V [libjvm.so+0x7a9ef5] PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, LoopOptsMode)+0xb3
        V [libjvm.so+0x7a9fee] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x46
        V [libjvm.so+0x79d5d7] Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0xf7
        V [libjvm.so+0x79e4e2] Compile::Optimize()+0xd68
        V [libjvm.so+0x79761f] Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0x11d9
        V [libjvm.so+0x68f3a3] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x15b
        V [libjvm.so+0x7b2d0b] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x895
        V [libjvm.so+0x7b1997] CompileBroker::compiler_thread_loop()+0x3df
        V [libjvm.so+0x11abafe] compiler_thread_entry(JavaThread*, Thread*)+0x69
        V [libjvm.so+0x11a7974] JavaThread::thread_main_inner()+0x14c
        V [libjvm.so+0x11a7820] JavaThread::run()+0x11e
        V [libjvm.so+0x11a3a30] Thread::call_run()+0x180
        V [libjvm.so+0xfa1d88] thread_native_entry(Thread*)+0x1e4

        Attachments

          Issue Links

            Activity

              People

                roland Roland Westrelin
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: