8259392: Zero error reporting is broken after JDK-8255711
Reviewed-by: dholmes
This commit is contained in:
parent
2806bf2e73
commit
bb247b02c8
@ -608,26 +608,22 @@ int JVM_HANDLE_XXX_SIGNAL(int sig, siginfo_t* info,
|
|||||||
// prepare fault pc address for error reporting.
|
// prepare fault pc address for error reporting.
|
||||||
if (S390_ONLY(sig == SIGILL || sig == SIGFPE) NOT_S390(false)) {
|
if (S390_ONLY(sig == SIGILL || sig == SIGFPE) NOT_S390(false)) {
|
||||||
pc = (address)info->si_addr;
|
pc = (address)info->si_addr;
|
||||||
|
} else if (ZERO_ONLY(true) NOT_ZERO(false)) {
|
||||||
|
// Non-arch-specific Zero code does not really know the pc.
|
||||||
|
// This can be alleviated by making arch-specific os::Posix::ucontext_get_pc
|
||||||
|
// available for Zero for known architectures. But for generic Zero
|
||||||
|
// code, it would still remain unknown.
|
||||||
|
pc = NULL;
|
||||||
} else {
|
} else {
|
||||||
pc = os::Posix::ucontext_get_pc(uc);
|
pc = os::Posix::ucontext_get_pc(uc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if defined(ZERO) && !defined(PRODUCT)
|
// For Zero, we ignore the crash context, because:
|
||||||
char buf[64];
|
// a) The crash would be in C++ interpreter code, so context is not really relevant;
|
||||||
VMError::report_and_die(t, sig, pc, info, ucVoid,
|
// b) Generic Zero code would not be able to parse it, so when generic error
|
||||||
"\n#"
|
// reporting code asks e.g. about frames on stack, Zero would experience
|
||||||
"\n# /--------------------\\"
|
// a secondary ShouldNotCallThis() crash.
|
||||||
"\n# | %-7s |"
|
VMError::report_and_die(t, sig, pc, info, NOT_ZERO(ucVoid) ZERO_ONLY(NULL));
|
||||||
"\n# \\---\\ /--------------/"
|
|
||||||
"\n# /"
|
|
||||||
"\n# [-] |\\_/| "
|
|
||||||
"\n# (+)=C |o o|__ "
|
|
||||||
"\n# | | =-*-=__\\ "
|
|
||||||
"\n# OOO c_c_(___)",
|
|
||||||
get_signal_name(sig, buf, sizeof(buf)));
|
|
||||||
#else
|
|
||||||
VMError::report_and_die(t, sig, pc, info, ucVoid);
|
|
||||||
#endif
|
|
||||||
// VMError should not return.
|
// VMError should not return.
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user