I think one of the fixes to rethrow the original exception when exceptions are thrown during constant pool resolution is causing NoSuchMethodErrors to be thrown. I was writing a test case for another issue and got this output.
$j160/fastdebug/bin/java -server -Xint sm
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.ThreadDeath: method <init>(Ljava/lang/String;)V not found
at sm.main(sm.java:29)
TraceExceptions output indicates that the NoSuchMethodError is being thrown in this code on the THROW_MSG_0 line:
// The original attempt to resolve this constant pool entry failed so find the
// original error and throw it again (JVMS 5.4.3).
if (in_error) {
symbolOop error = SystemDictionary::find_resolution_error(this_oop, which);
guarantee(error != (symbolOop)NULL, "tag mismatch with resolution error table");
ResourceMark rm;
// exception text will be the class name
const char* className = this_oop->unresolved_klass_at(which)->as_C_string();
THROW_MSG_0(error, className);
}
ThreadDeath has no constructor taking a String argument so of course this code isn't going to work. I don't know what's changed to cause this to show up in mustang but 1.5.0 doesn't have this problem.