Skip to content
Permalink
Browse files

8259392: Zero error reporting is broken after JDK-8255711

Reviewed-by: dholmes
  • Loading branch information
shipilev committed Jan 11, 2021
1 parent 2806bf2 commit bb247b02c82b5b74a3b3a1ce76075e5d109829e1
Showing with 12 additions and 16 deletions.
  1. +12 −16 src/hotspot/os/posix/signals_posix.cpp
@@ -608,26 +608,22 @@ int JVM_HANDLE_XXX_SIGNAL(int sig, siginfo_t* info,
// prepare fault pc address for error reporting.
if (S390_ONLY(sig == SIGILL || sig == SIGFPE) NOT_S390(false)) {
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 {
pc = os::Posix::ucontext_get_pc(uc);
}
}
#if defined(ZERO) && !defined(PRODUCT)
char buf[64];
VMError::report_and_die(t, sig, pc, info, ucVoid,
"\n#"
"\n# /--------------------\\"
"\n# | %-7s |"
"\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
// For Zero, we ignore the crash context, because:
// a) The crash would be in C++ interpreter code, so context is not really relevant;
// b) Generic Zero code would not be able to parse it, so when generic error
// reporting code asks e.g. about frames on stack, Zero would experience
// a secondary ShouldNotCallThis() crash.
VMError::report_and_die(t, sig, pc, info, NOT_ZERO(ucVoid) ZERO_ONLY(NULL));
// VMError should not return.
ShouldNotReachHere();
}

1 comment on commit bb247b0

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on bb247b0 Jan 11, 2021

Please sign in to comment.