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

C2: CmpU::Value must filter overflow computation against local sub computation

    XMLWordPrintable

Details

    • b07

    Backports

      Description

        The attached Java Fuzzer test fails with the following assertion:

        To reproduce:
        $ java -XX:StressSeed=2032591506 -XX:-TieredCompilation -XX:+StressCCP -Xcomp -XX:CompileOnly=Test Test.java
        $ java -XX:StressSeed=2032591506 -XX:-TieredCompilation -XX:+StressCCP -Xcomp -XX:CompileOnly=Reduced Reduced.java

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/opt/mach5/mesos/work_dir/slaves/0c72054a-24ab-4dbb-944f-97f9341a1b96-S8385/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c9470b35-e681-4289-98ed-c4298f665e5e/runs/b20e7e28-c065-4eb3-98f7-754e547baa60/workspace/open/src/hotspot/share/opto/phaseX.cpp:1763), pid=27138, tid=27151
        # assert(t->meet(t0) == t->remove_speculative()) failed: Not monotonic
        #
        # JRE version: Java(TM) SE Runtime Environment (21.0) (fastdebug build 21-internal-LTS-2023-01-11-0103419.ekaterina.pavlova.jdk.jdk.master)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 21-internal-LTS-2023-01-11-0103419.ekaterina.pavlova.jdk.jdk.master, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x17b6e34] PhaseCCP::analyze()+0x324
        ............
        Command Line: -XX:-TieredCompilation -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:StressSeed=1639636996 -Xmx1G -Xcomp -Xbatch -XX:CompileOnly=Test -XX:CompileCommand=quiet --add-modules=jdk.incubator.vector -XX:MaxRAMPercentage=4.16667 -Dtest.boot.jdk=/opt/mach5/mesos/work_dir/jib-master/install/jdk/19/36/bundles/linux-x64/jdk-19_linux-x64_bin.tar.gz/jdk-19 -Djava.io.tmpdir=/opt/mach5/mesos/work_dir/slaves/91e16c40-06d4-468a-9fc3-7198a5bb7d5a-S63303/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/2c025aa3-738b-4d52-9ba7-2d2924a7de06/runs/53df2e53-125b-4e7c-918d-e0ed7e4a7784/testoutput/test-support/jtreg_closed_test_hotspot_jtreg_applications_javafuzzer_MediumTest_java/tmp Test
        ............
        Current CompileTask:
        C2: 813 35 !b Test::lMeth (216 bytes)

        Stack: [0x00007fb16bdfe000,0x00007fb16beff000], sp=0x00007fb16befa0e0, free space=1008k
        Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x17b6e34] PhaseCCP::analyze()+0x324 (phaseX.cpp:1763)
        V [libjvm.so+0xb04f51] Compile::Optimize()+0x701 (compile.cpp:2360)
        V [libjvm.so+0xb097de] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x18ce (compile.cpp:830)
        V [libjvm.so+0x91a7e7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113)
        V [libjvm.so+0xb16acc] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237)
        V [libjvm.so+0xb178b8] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916)
        V [libjvm.so+0x1087316] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:710)
        V [libjvm.so+0x1a86740] Thread::call_run()+0x100 (thread.cpp:224)
        V [libjvm.so+0x17235b3] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739)

        Attachments

          1. FuzzerUtils.java
            13 kB
          2. hs_err_pid27138.log
            104 kB
          3. Reduced.java
            0.7 kB
          4. Test.java
            7 kB

          Issue Links

            Activity

              People

                epeter Emanuel Peter
                chagedorn Christian Hagedorn
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: