Received C2 crash in the attached program when used along with -XX:+UseCountedLoopSafepoints flag.
==
-sh-4.1$ /opt/java/jdk1.8.0_121/bin/javac MSSTest.java
-sh-4.1$ /opt/java/jdk1.8.0_121/bin/java -XX:+UseCountedLoopSafepoints MSSTest
Start
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fe003242fc9, pid=9101, tid=0x00007fdfc7fff700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x803fc9] PhaseIdealLoop::get_ctrl(Node*)+0x39
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /scratch/fairoz/JI/9047553/hs_err_pid9101.log
#
# Compiler replay data is saved as:
# /scratch/fairoz/JI/9047553/replay_pid9101.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
==