提交 7f04da98 编写于 作者: C coleenp

6472925: OutOfMemoryError fails to generate stack trace as it now ought

Summary: Print an additional message for OOM during stack trace printing
Reviewed-by: dholmes, phh, acorn, kamg, dcubed
上级 5c068227
......@@ -1611,7 +1611,15 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
uncaught_exception, // Arg 2
THREAD);
}
CLEAR_PENDING_EXCEPTION;
if (HAS_PENDING_EXCEPTION) {
ResourceMark rm(this);
jio_fprintf(defaultStream::error_stream(),
"\nException: %s thrown from the UncaughtExceptionHandler"
" in thread \"%s\"\n",
Klass::cast(pending_exception()->klass())->external_name(),
get_thread_name());
CLEAR_PENDING_EXCEPTION;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册