Skip to content

Commit

Permalink
8294003: Don't handle si_addr == 0 && si_code == SI_KERNEL SIGSEGVs
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes, shade, dlong
  • Loading branch information
stefank committed Sep 22, 2022
1 parent a216960 commit d781ab0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,11 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
if (info != NULL && uc != NULL && thread != NULL) {
pc = (address) os::Posix::ucontext_get_pc(uc);

#ifndef AMD64
// Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs
// This can happen in any running code (currently more frequently in
// interpreter code but has been seen in compiled code)
if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) {
fatal("An irrecoverable SI_KERNEL SIGSEGV has occurred due "
"to unstable signal handling in this distribution.");
// An irrecoverable SI_KERNEL SIGSEGV has occurred.
// It's likely caused by dereferencing an address larger than TASK_SIZE.
return false;
}
#endif // AMD64

// Handle ALL stack overflow variations here
if (sig == SIGSEGV) {
Expand Down

1 comment on commit d781ab0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.