Skip to content

Commit

Permalink
Automatic merge of jdk:master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
duke committed Nov 3, 2020
2 parents b9d0075 + aa2862a commit 40c19f0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,16 @@ JVM_handle_linux_signal(int sig,
}
#endif // !PRODUCT

char buf[64];

sprintf(buf, "caught unhandled signal %d", sig);
char buf[128];
char exc_buf[32];

if (os::exception_name(sig, exc_buf, sizeof(exc_buf))) {
bool sent_by_kill = (info != NULL && os::signal_sent_by_kill(info));
snprintf(buf, sizeof(buf), "caught unhandled signal: %s %s",
exc_buf, sent_by_kill ? "(sent by kill)" : "");
} else {
snprintf(buf, sizeof(buf), "caught unhandled signal: %d", sig);
}

// Silence -Wformat-security warning for fatal()
PRAGMA_DIAG_PUSH
Expand Down

0 comments on commit 40c19f0

Please sign in to comment.