JDK-8154763 : Crash with "assert(RangeCheckElimination)" if RangeCheckElimination is disabled
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-04-20
  • Updated: 2016-05-26
  • Resolved: 2016-04-25
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 9
9 b120Fixed
Related Reports
Relates :  
Description
JDK-8151573 adds a PhaseIdealLoop::has_range_checks function(src/share/vm/opto/loopTransform.cpp module) with following assert:
void PhaseIdealLoop::has_range_checks(IdealLoopTree *loop) {
  assert(RangeCheckElimination, "");
...

Running java(2016-04-18 hs nightly bundle) with -XX:-RangeCheckElimination hits this assert on my linux-x64 under Virtual-box:
java -XX:-RangeCheckElimination
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/loopTransform.cpp:2303
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/scratch/opt/jprt/T/P1/192409.cplummer/s/hotspot/src/share/vm/opto/loopTransform.cpp:2303), pid=31884, tid=32187
#  Error: assert(RangeCheckElimination) failed
#
# JRE version: Java(TM) SE Runtime Environment (9.0) (fastdebug build 9-internal+0-2016-04-18-192409.cplummer.hs-rt-8152761)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 9-internal+0-2016-04-18-192409.cplummer.hs-rt-8152761, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/dmitry/work/nighly_bundles/nightly.2016-04-18/fastdebug/bin/core.31884)
#
...

hs_err_pid31884.log and replay_pid31884.log are attached.
Comments
JDK-8151573 introduced multiversioning for range check elimination. Explicitly turning of range check elimination now crashes the VM with an assert in PhaseIdealLoop::has_range_checks() because we assume that this is only called if range check elimination is enabled. I think we should disable multiversioning if range check elimination is turned off. I added the corresponding check. http://cr.openjdk.java.net/~thartmann/8154763/webrev.00/
21-04-2016

ILW = Crash with assert in fastdebug, only if RangeCheckElimination is disabled, no workaround = MLH = P4
21-04-2016