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

C2: Compilation fails with "assert(bol->is_Bool()) failed: unexpected if shape" in StringConcat::eliminate_unneeded_control

XMLWordPrintable

      C2 compilation fails during stacked string concatenation optimization in
      StringConcat::eliminate_unneeded_control with "assert(bol->is_Bool()) failed: unexpected if shape".

      <...>/java -XX:+PrintOptimizeStringConcat -XX:-TieredCompilation TestStackedConcats.java

      ====

      <...>

      stacking would succeed
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (<...>/hotspot/share/opto/stringopts.cpp:259), <...>
      # assert(bol->is_Bool()) failed: unexpected if shape
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0) (fastdebug build 25-internal-<...>)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-internal-<...>, mixed mode, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      V [libjvm.so+0x17954f1] StringConcat::eliminate_unneeded_control()+0x2f7 (stringopts.cpp:259)
      V [libjvm.so+0x179d780] PhaseStringOpts::replace_string_concat(StringConcat*)+0x2cc (stringopts.cpp:1748)
      V [libjvm.so+0x1797771] PhaseStringOpts::PhaseStringOpts(PhaseGVN*)+0x5a1 (stringopts.cpp:707)
      V [libjvm.so+0xb0c535] Compile::inline_string_calls(bool)+0x215 (compile.cpp:2037)
      V [libjvm.so+0xb06055] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1725 (compile.cpp:830)
      V [libjvm.so+0x9b9a14] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x486 (c2compiler.cpp:141)
      V [libjvm.so+0xb2e535] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe01 (compileBroker.cpp:2307)
      V [libjvm.so+0xb2c92e] CompileBroker::compiler_thread_loop()+0x576 (compileBroker.cpp:1951)
      V [libjvm.so+0xb4ec23] CompilerThread::thread_entry(JavaThread*, JavaThread*)+0x89 (compilerThread.cpp:67)
      V [libjvm.so+0x101bdbc] JavaThread::thread_main_inner()+0x1b2 (javaThread.cpp:773)
      V [libjvm.so+0x101bc07] JavaThread::run()+0x1d7 (javaThread.cpp:758)
      V [libjvm.so+0x18c96fd] Thread::call_run()+0x1b9 (thread.cpp:231)
      V [libjvm.so+0x15ed8ff] thread_native_entry(Thread*)+0x1f5 (os_linux.cpp:870)

      ====

      bol is 20 ConI === 0 [[ 118 212 96 315 244 ]] #int:0

        1. before_string_opts.png
          155 kB
          Daniel Skantz
        2. TestStackedConcats.java
          0.3 kB
          Daniel Skantz

            Unassigned Unassigned
            dskantz Daniel Skantz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: