8205925: Print correct and more information about secondary errors
Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
18eb98ccbc
commit
13d55b0087
@ -1385,9 +1385,24 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
|
|||||||
os::infinite_sleep();
|
os::infinite_sleep();
|
||||||
} else {
|
} else {
|
||||||
// Crash or assert during error reporting. Lets continue reporting with the next step.
|
// Crash or assert during error reporting. Lets continue reporting with the next step.
|
||||||
jio_snprintf(buffer, sizeof(buffer),
|
stringStream ss(buffer, sizeof(buffer));
|
||||||
"[error occurred during error reporting (%s), id 0x%x]",
|
// Note: this string does get parsed by a number of jtreg tests,
|
||||||
_current_step_info, _id);
|
// see hotspot/jtreg/runtime/ErrorHandling.
|
||||||
|
ss.print("[error occurred during error reporting (%s), id 0x%x",
|
||||||
|
_current_step_info, id);
|
||||||
|
char signal_name[64];
|
||||||
|
if (os::exception_name(id, signal_name, sizeof(signal_name))) {
|
||||||
|
ss.print(", %s (0x%x) at pc=" PTR_FORMAT, signal_name, id, p2i(pc));
|
||||||
|
} else {
|
||||||
|
if (should_report_bug(id)) {
|
||||||
|
ss.print(", Internal Error (%s:%d)",
|
||||||
|
filename == NULL ? "??" : filename, lineno);
|
||||||
|
} else {
|
||||||
|
ss.print(", Out of Memory Error (%s:%d)",
|
||||||
|
filename == NULL ? "??" : filename, lineno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ss.print("]");
|
||||||
st->print_raw_cr(buffer);
|
st->print_raw_cr(buffer);
|
||||||
st->cr();
|
st->cr();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user