--- old/src/share/vm/prims/unsafe.cpp 2014-02-12 10:42:24.530957373 -0800 +++ new/src/share/vm/prims/unsafe.cpp 2014-02-12 10:42:24.373946505 -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); }