提交 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,9 +1611,17 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
uncaught_exception, // Arg 2
THREAD);
}
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;
}
}
}
// Call Thread.exit(). We try 3 times in case we got another Thread.stop during
// the execution of the method. If that is not enough, then we don't really care. Thread.stop
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册