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

C2: assert(static_cast<T1>(result) == thing) caused by ReverseBytesNode::Value()

XMLWordPrintable

      Reproducible with attached test case:

      $ java -XX:-BackgroundCompilation TestReverseBytesLargeConstantInput

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/home/roland/jdk-jdk/src/hotspot/share/utilities/checkedCast.hpp:41), pid=322651, tid=322670
      # assert(static_cast<T1>(result) == thing) failed: must be
      #
      # JRE version: OpenJDK Runtime Environment (26.0) (fastdebug build 26-internal-adhoc.roland.jdk-jdk)
      # Java VM: OpenJDK 64-Bit Server VM (fastdebug 26-internal-adhoc.roland.jdk-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x1936b15] ReverseBytesNode::Value(PhaseGVN*) const+0x285
      #

      Current CompileTask:
      C2:2961 1564 % b 4 TestReverseBytesLargeConstantInput::test1 @ 8 (32 bytes)

      Stack: [0x00007eb778300000,0x00007eb778400000], sp=0x00007eb7783fb910, free space=1006k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1a5effc] ReverseBytesNode::Value(PhaseGVN*) const+0x2bc (checkedCast.hpp:41)
      V [libjvm.so+0x18167ef] PhaseGVN::transform(Node*)+0x1cf
      V [libjvm.so+0x1479a8d] LibraryCallKit::inline_number_methods(vmIntrinsicID)+0x7d
      V [libjvm.so+0x14a5268] LibraryCallKit::try_to_inline(int)+0x138
      V [libjvm.so+0x14a81d1] LibraryIntrinsic::generate(JVMState*)+0x231
      V [libjvm.so+0xd091a2] Parse::do_call()+0x712
      V [libjvm.so+0x17e8eb8] Parse::do_one_bytecode()+0x4b8
      V [libjvm.so+0x17d61a7] Parse::do_one_block()+0x357
      V [libjvm.so+0x17d74a0] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x17da983] Parse::Parse(JVMState*, ciMethod*, float)+0xaa3
      V [libjvm.so+0x96dd6b] ParseGenerator::generate(JVMState*)+0x13b
      V [libjvm.so+0xd091a2] Parse::do_call()+0x712
      V [libjvm.so+0x17e8eb8] Parse::do_one_bytecode()+0x4b8
      V [libjvm.so+0x17d61a7] Parse::do_one_block()+0x357
      V [libjvm.so+0x17d74a0] Parse::do_all_blocks()+0x130
      V [libjvm.so+0x17da983] Parse::Parse(JVMState*, ciMethod*, float)+0xaa3
      V [libjvm.so+0x96dd6b] ParseGenerator::generate(JVMState*)+0x13b
      V [libjvm.so+0xb459f8] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1828
      V [libjvm.so+0x96b657] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x467
      V [libjvm.so+0xb55538] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xb58
      V [libjvm.so+0xb56708] CompileBroker::compiler_thread_loop()+0x578
      V [libjvm.so+0x10a8e0b] JavaThread::thread_main_inner()+0x13b
      V [libjvm.so+0x1b0ca06] Thread::call_run()+0xb6
      V [libjvm.so+0x1787f38] thread_native_entry(Thread*)+0x128

            hgreule Hannes Greule
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: