mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6472925: OutOfMemoryError fails to generate stack trace as it now ought
Print an additional message for OOM during stack trace printing Reviewed-by: dholmes, phh, acorn, kamg, dcubed
This commit is contained in:
parent
2fcd065a0d
commit
c4ddbc7c87
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue