< prev index next >
src/hotspot/share/utilities/vmError.cpp
Print this page
rev 49255 : 8191101: Show register content in hs-err file on assert
Reviewed-by:
@@ -1236,14 +1236,14 @@
void VMError::report_and_die(const char* message)
{
report_and_die(message, "%s", "");
}
-void VMError::report_and_die(Thread* thread, const char* filename, int lineno, const char* message,
+void VMError::report_and_die(Thread* thread, void* context, const char* filename, int lineno, const char* message,
const char* detail_fmt, va_list detail_args)
{
- report_and_die(INTERNAL_ERROR, message, detail_fmt, detail_args, thread, NULL, NULL, NULL, filename, lineno, 0);
+ report_and_die(INTERNAL_ERROR, message, detail_fmt, detail_args, thread, NULL, NULL, context, filename, lineno, 0);
}
void VMError::report_and_die(Thread* thread, const char* filename, int lineno, size_t size,
VMErrorType vm_err_type, const char* detail_fmt, va_list detail_args) {
report_and_die(vm_err_type, NULL, detail_fmt, detail_args, thread, NULL, NULL, NULL, filename, lineno, size);
@@ -1672,28 +1672,28 @@
// Case 14 is tested by test/hotspot/jtreg/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java.
// Case 15 is tested by test/hotspot/jtreg/runtime/ErrorHandling/SecondaryErrorTest.java.
// Case 16 is tested by test/hotspot/jtreg/runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java.
// Case 17 is tested by test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java.
switch (how) {
- case 1: vmassert(str == NULL, "expected null");
+ case 1: vmassert(str == NULL, "expected null"); break;
case 2: vmassert(num == 1023 && *str == 'X',
- "num=" SIZE_FORMAT " str=\"%s\"", num, str);
- case 3: guarantee(str == NULL, "expected null");
+ "num=" SIZE_FORMAT " str=\"%s\"", num, str); break;
+ case 3: guarantee(str == NULL, "expected null"); break;
case 4: guarantee(num == 1023 && *str == 'X',
- "num=" SIZE_FORMAT " str=\"%s\"", num, str);
- case 5: fatal("expected null");
- case 6: fatal("num=" SIZE_FORMAT " str=\"%s\"", num, str);
+ "num=" SIZE_FORMAT " str=\"%s\"", num, str); break;
+ case 5: fatal("expected null"); break;
+ case 6: fatal("num=" SIZE_FORMAT " str=\"%s\"", num, str); break;
case 7: fatal("%s%s# %s%s# %s%s# %s%s# %s%s# "
"%s%s# %s%s# %s%s# %s%s# %s%s# "
"%s%s# %s%s# %s%s# %s%s# %s",
msg, eol, msg, eol, msg, eol, msg, eol, msg, eol,
msg, eol, msg, eol, msg, eol, msg, eol, msg, eol,
- msg, eol, msg, eol, msg, eol, msg, eol, msg);
- case 8: vm_exit_out_of_memory(num, OOM_MALLOC_ERROR, "ChunkPool::allocate");
- case 9: ShouldNotCallThis();
- case 10: ShouldNotReachHere();
- case 11: Unimplemented();
+ msg, eol, msg, eol, msg, eol, msg, eol, msg); break;
+ case 8: vm_exit_out_of_memory(num, OOM_MALLOC_ERROR, "ChunkPool::allocate"); break;
+ case 9: ShouldNotCallThis(); break;
+ case 10: ShouldNotReachHere(); break;
+ case 11: Unimplemented(); break;
// There's no guarantee the bad data pointer will crash us
// so "break" out to the ShouldNotReachHere().
case 12: *dataPtr = '\0'; break;
// There's no guarantee the bad function pointer will crash us
// so "break" out to the ShouldNotReachHere().
@@ -1712,9 +1712,10 @@
}
}
default: tty->print_cr("ERROR: %d: unexpected test_num value.", how);
}
+ tty->print_cr("VMError::controlled_crash: survived intentional crash. Did you suppress the assert?");
ShouldNotReachHere();
}
#endif // !PRODUCT
< prev index next >