(hs_err file text removed because it was too large. It will be added as an attachment)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
class Crasher{
public static void main(String[] args) throws Exception{
StringBuffer builder = new StringBuffer();
for(int i = 0; i < 100; i++)
builder.append("I am the very model of a modern major general\n");
for(int j = 0; j < builder.length(); j++){
previousSpaceIndex(builder, j);
}
}
private static final int previousSpaceIndex(CharSequence sb, int seek) {
seek--;
while (seek > 0) {
if (sb.charAt(seek) == ' ') {
while (seek > 0 && sb.charAt(seek - 1) == ' ')
seek--;
return seek;
}
seek--;
}
return 0;
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
I have not found one yet.
Running this test case using the fastdebug build fails an assertion:
% /opt/java/jdk1.7.0-b59/fastdebug/bin/java -server -d64 -showversion -Xbatch -XX:+PrintCompilation Crasher
VM option '+PrintCompilation'
java version "1.7.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.7.0-ea-fastdebug-b59)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b03-fastdebug, mixed mode)
1 s b java.lang.StringBuffer::charAt (28 bytes)
2 b Crasher::previousSpaceIndex (53 bytes)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/split_if.cpp:113
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/opto/split_if.cpp:113), pid=21575, tid=12
# Error: assert(bol->is_Bool(),"")
#
# JRE version: 7.0-b59
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b03-fastdebug mixed mode solaris-amd64 )
# An error report file with more information is saved as:
# /var/tmp/tbell/pub/tmpjava/hs_err_pid21575.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 12
Dumping core ...
zsh: IOT instruction (core dumped) /opt/java/jdk1.7.0-b59/fastdebug/bin/java -server -d64 -showversion -Xbatch
See the attached file (hs_err.html) for more information.