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

C2: assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test

    XMLWordPrintable

Details

    • b24
    • 18
    • b07

    Backports

      Description

        The attached test fails with the following assert. This is the very same problem as reported with JDK-8314191 but with long counted loops and a different manifestation. The follow-up fix of JDK-8314191 wrongly checks against CountedLoopNodes instead of `LongCountedLoopNodes in the newly added is_cloop_condition(). This should be changed to check against BaseCountedLoopNodes accordingly.

        To reproduce:

        $ java -Xcomp -XX:CompileCommand=compileonly,Test*::test TestLongMinValue.java

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/opt/mach5/mesos/work_dir/slaves/afbc6042-3a24-4198-9369-18c663a3f74c-S38629/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/38e9bdcc-eebc-4966-866e-e4e5ee117550/runs/849e2004-3d12-46ef-9189-ddce518a1214/workspace/open/src/hotspot/share/opto/loopnode.cpp:1459), pid=516707, tid=516721
        # assert(cmp != nullptr && cmp->Opcode() == Op_Cmp(bt)) failed: no exit test
        #
        # JRE version: Java(TM) SE Runtime Environment (23.0+3) (fastdebug build 23-ea+3-133)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-ea+3-133, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x1289a2c] PhaseIdealLoop::check_counted_loop_shape(IdealLoopTree*, Node*, BasicType)+0x53c
        .........
        Command Line: -XX:+TraceLoopOpts -Xcomp -XX:-TieredCompilation -XX:CompileCommand=compileonly,Test*::test --add-modules=ALL-DEFAULT jdk.compiler/com.sun.tools.javac.launcher.SourceLauncher TestLongMinValue.java
        .........
        Current CompileTask:
        C2:975 83 b TestLongMinValue::test (34 bytes)

        Stack: [0x00007f1da8e00000,0x00007f1da8f00000], sp=0x00007f1da8efa9d0, free space=1002k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x1289a2c] PhaseIdealLoop::check_counted_loop_shape(IdealLoopTree*, Node*, BasicType)+0x53c (loopnode.cpp:1459)
        V [libjvm.so+0x12a242c] PhaseIdealLoop::create_loop_nest(IdealLoopTree*, Node_List&)+0xbc
        V [libjvm.so+0x127fa78] IdealLoopTree::iteration_split_impl(PhaseIdealLoop*, Node_List&)+0x478
        V [libjvm.so+0x127fd4e] IdealLoopTree::iteration_split(PhaseIdealLoop*, Node_List&)+0x17e
        V [libjvm.so+0x12ac7f8] PhaseIdealLoop::build_and_optimize()+0xdf8
        V [libjvm.so+0x9f3248] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0x388
        V [libjvm.so+0x9ee356] Compile::Optimize()+0xb96
        V [libjvm.so+0x9f1d7b] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1beb
        V [libjvm.so+0x83e277] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1e7
        V [libjvm.so+0x9fd33c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x92c
        V [libjvm.so+0x9fdfc8] CompileBroker::compiler_thread_loop()+0x468
        V [libjvm.so+0xeba63c] JavaThread::thread_main_inner()+0xcc
        V [libjvm.so+0x179fc46] Thread::call_run()+0xb6
        V [libjvm.so+0x14a9ef7] thread_native_entry(Thread*)+0x127

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: