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

PhaseIdealLoop::only_has_infinite_loops must detect all loops that never lead to termination



    • b27



        This is a reduction from a fuzzer test I am using for JDK-8280126, but it used to work on my un-synced repo. Probably it is related to the issues in JDK-8294217.

        When I last debugged the test, it seemed to create an infinite irreducible loop, that did not have a NeverBranch node inserted. That was also against my assumption at the time. But I was able to work around that. Now it seems to be triggered in maiinline already.

        Reproduce it:
        java -jar ~/Documents/asmtools-7.0-build/release/lib/asmtools.jar jasm TestIrreducibleInfiniteNoNeverBranch.jasm
        java -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:CompileCommand=compileonly,TestIrreducibleInfiniteNoNeverBranch::test* -XX:-TieredCompilation -XX:-RenumberLiveNodes -Xbatch -Xcomp -XX:PerMethodTrapLimit=0 -XX:+TraceLoopOpts TestIrreducibleInfiniteNoNeverBranch

        I vaguely remember that -XX:PerMethodTrapLimit=0 was required to create this graph.

        # To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=/loopnode.cpp:4300
        # A fatal error has been detected by the Java Runtime Environment:
        # Internal Error (/home/emanuel/Documents/fork2-jdk/open/src/hotspot/share/opto/loopnode.cpp:4300), pid=1154129, tid=1154142
        # assert(_ltree_root->_child == __null || C->has_loops() || only_has_infinite_loops() || C->has_exception_backedge()) failed: parsing found no loops but there are some
        # JRE version: Java(TM) SE Runtime Environment (20.0) (slowdebug build 20-internal-2022-11-25-1142101.emanuel...)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 20-internal-2022-11-25-1142101.emanuel..., compiled mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0xf685e3] PhaseIdealLoop::build_and_optimize()+0x353
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/emanuel/Documents/debug-tools/bytecode-fuzzer/core.1154129)
        # An error report file with more information is saved as:
        # /home/emanuel/Documents/debug-tools/bytecode-fuzzer/hs_err_pid1154129.log
        # Compiler replay data is saved as:
        # /home/emanuel/Documents/debug-tools/bytecode-fuzzer/replay_pid1154129.log
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp


          Issue Links



                epeter Emanuel Peter
                epeter Emanuel Peter
                0 Vote for this issue
                7 Start watching this issue