The symptom is the old "unhandled
explicit exception in compiled code" guarantee. This is JDK7 b12 on
Solaris 10 x86 (Intel) running SPECjbb2005. I am running with a
modified TreeMap however the code changes are pure Java and should not
cause a crash. However the crash comes while executing the modified
TreeMap code, specifically line 1139:
Entry<K,V> cur = root;
if (first != null && cur != null) {
int cmp = compare(first.key, cur.key);
while (cur != null && cmp != 0) {
stack.push(cur);
// if (cur == null) throw new NullPointerException();
if (cmp < 0) cur = cur.left; // line 1139: CRASHES HERE
else cur = cur.right;
}
}
(Complete TreeMap.java listing is attached.) Note that this code
actually has a bug in it: the variable "cmp" is not updated each time
through the loop. Still, it shouldn't crash. :)
So I ran this with fastdebug + PrintNMethods; yielding the message
"implicit exception happened at 0xfa16f217":
0xfa16f1e5: movl 0x14(%esi),%ebp
0xfa16f1e8: movl %ebp,0x18(%esp,1)
0xfa16f1ec: leal 0x14(%ebx),%ebp
0xfa16f1ef: movl %ebp,0x1c(%esp,1)
0xfa16f1f3: leal 0xc(%ebx),%ebp
0xfa16f1f6: movl %ebp,0x20(%esp,1)
0xfa16f1fa: movl 0x18(%esp,1),%ebp
0xfa16f1fe: movl 0x14(%ebp),%ebp
0xfa16f201: movl %ebp,0x28(%esp,1)
0xfa16f205: leal 0x10(%ebx),%ebp
0xfa16f208: movl %ebp,0x2c(%esp,1)
0xfa16f20c: movl 0x28(%esp,1),%ebp
0xfa16f210: movl 0x14(%ebp),%ebp
0xfa16f213: movl %ebp,0x30(%esp,1)
0xfa16f217: movl 0x14(%ebp),%esi ;*getfield left <--- CRASH HERE
; -
java.util.TreeMap$PrivateEntryIterator::<init>@104 (line 1139)
Again, the complete PrintNMethods listing for
TreeMap$PrivateEntryIterator::<init> is attached.
Any clues or debugging hints are appreciated. If it's unrecognized I'll
just extract a testcase and file a bug.
From Steve Bohne
Run specjbb2005 with modified java/util/TreeMap.java (attached)
java -test -XX:CICompilerCount=1 -Xbatch -Xbootclasspath/p:./java/util/TreeMap.class -classpath ./jbb.jar:./check.jar -XX:+PrintCompilation -Xmx1g spec.jbb.JBBmain -propfile SPECjbb.props