C2 SuperWord: speculative check uses VPointer variable was pinned after speculative check, leading to bad graph

XMLWordPrintable

      The attached Java Fuzzer test starts to fail after JDK-8324751 (observed with Reduced.java, Test.java only starts to fail after JDK-8327963):

      To reproduce:
      $ java -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test.java
      $ java -XX:CompileCommand=compileonly,*Reduced*::* -Xcomp Reduced.java


      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/System/Volumes/Data/mesos/work_dir/slaves/da1065b5-7b94-4f0d-85e9-a3a252b9a32e-S16418/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/09c1a5b3-f706-47d1-aaf5-a682f77694db/runs/a5c7a81e-0082-408a-8496-3d2875fbebe2/workspace/open/src/hotspot/share/opto/loopnode.cpp:6890), pid=94688, tid=27395
      # assert(false) failed: Bad graph detected in build_loop_late
      #
      # JRE version: Java(TM) SE Runtime Environment (26.0+28) (fastdebug build 26-ea+28-2780)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 26-ea+28-2780, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
      ................
      Command Line: -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test_4066
      ................
      Current CompileTask:
      C2:743 50 % !b 4 Test_4066::mainTest @ 295 (645 bytes)

      Stack: [0x0000000171498000,0x000000017169b000], sp=0x0000000171696b30, free space=2042k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.dylib+0x1273984] VMError::report(outputStream*, bool)+0x1b70 (loopnode.cpp:6890)
      V [libjvm.dylib+0x1277288] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void const*, void const*, char const*, int, unsigned long)+0x55c
      V [libjvm.dylib+0x5e40a4] print_error_for_unit_test(char const*, char const*, char*)+0x0
      V [libjvm.dylib+0xd511d4] PhaseIdealLoop::build_loop_late_post_work(Node*, bool)+0x9d8
      V [libjvm.dylib+0xd4ae70] PhaseIdealLoop::build_loop_late(VectorSet&, Node_List&, Node_Stack&)+0x2b8
      V [libjvm.dylib+0xd494c4] PhaseIdealLoop::build_and_optimize()+0x798
      V [libjvm.dylib+0x54babc] PhaseIdealLoop::PhaseIdealLoop(PhaseIterGVN&, LoopOptsMode)+0x28c
      V [libjvm.dylib+0x53c9f4] PhaseIdealLoop::optimize(PhaseIterGVN&, LoopOptsMode)+0xb0
      V [libjvm.dylib+0x53cfbc] Compile::optimize_loops(PhaseIterGVN&, LoopOptsMode)+0x9c
      V [libjvm.dylib+0x53508c] Compile::Optimize()+0xc04
      V [libjvm.dylib+0x53306c] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1578
      V [libjvm.dylib+0x3f0224] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x208
      V [libjvm.dylib+0x5549b8] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x98c
      V [libjvm.dylib+0x553cb8] CompileBroker::compiler_thread_loop()+0x3cc
      V [libjvm.dylib+0x94db10] JavaThread::thread_main_inner()+0x1f8
      V [libjvm.dylib+0x11b3354] Thread::call_run()+0xf0
      V [libjvm.dylib+0xf00f58] thread_native_entry(Thread*)+0x13

        1. Test.java
          7 kB
          Christian Hagedorn
        2. Reduced.java
          0.6 kB
          Christian Hagedorn
        3. proposed_fix.diff
          3 kB
          Emanuel Peter
        4. img0_at_assert.png
          33 kB
          Emanuel Peter
        5. hs_err_pid94688.log
          86 kB
          Christian Hagedorn
        6. FuzzerUtils.java
          13 kB
          Christian Hagedorn

            Assignee:
            Emanuel Peter
            Reporter:
            Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: