JDK-8044538 : assert(which != imm_operand) failed: instruction is not a movq reg, imm64
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7u1,8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-06-02
  • Updated: 2015-01-21
  • Resolved: 2014-06-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u40Fixed 9 b20Fixed
Description
Running Nashorn + Octane with -XX:-TieredCompilation -XX:+PrintRecolations fails with the following error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/oracle/tip/src/cpu/x86/vm/assembler_x86.cpp:747), pid=29879, tid=140223982565120
#  assert(which != imm_operand) failed: instruction is not a movq reg, imm64
Comments
Evaluation: The problem occurs while printing the relocation entries for a C2 compiled function. The C2 compiler adds internal_word_type relocations for the jump table entries in the constant section of a method (see Compile::ConstantTable::fill_jump_table(...)). These relocations are processed by RelocIterator::print_current(...) and internal_word_Relocation::target(). Relocation::pd_get_address_from_code() then tries to retrieve the address from an instruction but fails because the relocation points into the constant section only containing the target address.
04-06-2014

ILW: Crash, only in debug build, workaround exists = HLL = P4
03-06-2014

Bug can also be reproduced with: java -XX:+PrintRelocations -Xcomp -version
03-06-2014

Sometimes the VM crashes already at the ShouldNotReachHere() at line 739: # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (/oracle/8044538/src/cpu/x86/vm/assembler_x86.cpp:739), pid=5351, tid=139921433929472 # Error: ShouldNotReachHere()
02-06-2014