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

C2 fails with assert "bad profile data type" when TypeProfileCasts is disabled

XMLWordPrintable

      java -XX:-TypeProfileCasts Test.java

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/workspace/open/src/hotspot/share/opto/graphKit.cpp:2301), pid=2173911, tid=2173929
      # assert(data->is_ReceiverTypeData()) failed: bad profile data type
      #
      # JRE version: Java(TM) SE Runtime Environment (25.0+26) (fastdebug build 25-ea+26-LTS-3300)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 25-ea+26-LTS-3300, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0xf497bb] GraphKit::record_profiled_receiver_for_speculation(Node*) [clone .part.0]+0x3ab

      Current CompileTask:
      C2:98 195 4 java.lang.String::equals (56 bytes)

      Stack: [0x0000781ffea00000,0x0000781ffeb00000], sp=0x0000781ffeafc3b0, free space=1008k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xf497bb] GraphKit::record_profiled_receiver_for_speculation(Node*) [clone .part.0]+0x3ab (graphKit.cpp:2301)
      V [libjvm.so+0xf563cb] GraphKit::gen_instanceof(Node*, Node*, bool)+0x3eb
      V [libjvm.so+0x17c3878] Parse::do_instanceof()+0x318
      V [libjvm.so+0x17bbe7c] Parse::do_one_bytecode()+0x2bfc
      V [libjvm.so+0x17a6a67] Parse::do_one_block()+0x357
      V [libjvm.so+0x17a7d60] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x17ab243] Parse::Parse(JVMState*, ciMethod*, float)+0xaa3
      V [libjvm.so+0x95256b] ParseGenerator::generate(JVMState*)+0x13b
      V [libjvm.so+0xb283d8] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1828
      V [libjvm.so+0x94fe57] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x467
      V [libjvm.so+0xb37f18] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58
      V [libjvm.so+0xb390e8] CompileBroker::compiler_thread_loop()+0x578
      V [libjvm.so+0x108590b] JavaThread::thread_main_inner()+0x13b
      V [libjvm.so+0x1ad1746] Thread::call_run()+0xb6
      V [libjvm.so+0x1759058] thread_native_entry(Thread*)+0x128

            Unassigned Unassigned
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: