mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-03 06:35:31 +00:00
8354489: Some callers of VMError::report_and_die think it can return
Reviewed-by: amitkumar, dholmes
This commit is contained in:
parent
6b590fd86d
commit
835c7b1be5
@ -2671,14 +2671,6 @@ LONG Handle_IDiv_Exception(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
|
||||
static inline void report_error(Thread* t, DWORD exception_code,
|
||||
address addr, void* siginfo, void* context) {
|
||||
VMError::report_and_die(t, exception_code, addr, siginfo, context);
|
||||
|
||||
// If UseOSErrorReporting, this will return here and save the error file
|
||||
// somewhere where we can find it in the minidump.
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
JNIEXPORT
|
||||
LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
@ -2750,9 +2742,8 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
// Fatal red zone violation.
|
||||
overflow_state->disable_stack_red_zone();
|
||||
tty->print_raw_cr("An unrecoverable stack overflow has occurred.");
|
||||
report_error(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
VMError::report_and_die(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
}
|
||||
} else if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
|
||||
if (in_java) {
|
||||
@ -2789,9 +2780,8 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
address stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
|
||||
if (stub != nullptr) return Handle_Exception(exceptionInfo, stub);
|
||||
}
|
||||
report_error(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
VMError::report_and_die(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
}
|
||||
|
||||
// Special care for fast JNI field accessors.
|
||||
@ -2803,9 +2793,8 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
}
|
||||
|
||||
// Stack overflow or null pointer exception in native code.
|
||||
report_error(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
VMError::report_and_die(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
} // /EXCEPTION_ACCESS_VIOLATION
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@ -2873,8 +2862,8 @@ LONG WINAPI topLevelExceptionFilter(struct _EXCEPTION_POINTERS* exceptionInfo) {
|
||||
#endif
|
||||
|
||||
if (should_report_error) {
|
||||
report_error(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
VMError::report_and_die(t, exception_code, pc, exception_record,
|
||||
exceptionInfo->ContextRecord);
|
||||
}
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
@ -2894,8 +2883,8 @@ LONG WINAPI topLevelUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* excepti
|
||||
Thread* thread = Thread::current_or_null_safe();
|
||||
|
||||
if (exceptionCode != EXCEPTION_BREAKPOINT) {
|
||||
report_error(thread, exceptionCode, pc, exceptionInfo->ExceptionRecord,
|
||||
exceptionInfo->ContextRecord);
|
||||
VMError::report_and_die(thread, exceptionCode, pc, exceptionInfo->ExceptionRecord,
|
||||
exceptionInfo->ContextRecord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -240,10 +240,6 @@ void report_vm_out_of_memory(const char* file, int line, size_t size,
|
||||
|
||||
VMError::report_and_die(Thread::current_or_null(), file, line, size, vm_err_type, detail_fmt, detail_args);
|
||||
va_end(detail_args);
|
||||
|
||||
// The UseOSErrorReporting option in report_and_die() may allow a return
|
||||
// to here. If so then we'll have to figure out how to handle it.
|
||||
guarantee(false, "report_and_die() should not return here");
|
||||
}
|
||||
|
||||
void report_should_not_call(const char* file, int line) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user