--- old/src/share/vm/prims/unsafe.cpp 2014-02-06 15:16:09.801974075 -0800 +++ new/src/share/vm/prims/unsafe.cpp 2014-02-06 15:16:09.662964480 -0800 @@ -858,6 +858,11 @@ strcpy(buf, "java/lang/"); strcat(buf, ename); jclass cls = env->FindClass(buf); + if (env->ExceptionCheck()) { + env->ExceptionClear(); + tty->print_cr("Unsafe: cannot throw %s because FindClass has failed", buf); + return; + } char* msg = NULL; env->ThrowNew(cls, msg); }