RFR: 8283337: Posix signal handler modification warning triggering incorrectly

David Holmes dholmes at openjdk.java.net
Fri Mar 18 02:31:26 UTC 2022


On Thu, 17 Mar 2022 19:23:10 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

> PosixSignals::print_signal_handler() is incorrectly detecting a changed signal handler.  The signal handler for SIGBREAK/SIGQUIT is now set in src/hotspot/os/posix/signals_posix.cpp with the bool parameter do_check set to false.
> 
> set_signal_handler should only store a handler in vm_handlers when do_check is true.
> 
> However I don't see a simple way of getting a valid warning for the SIGQUIT handler, if it is added later when os::initialize_jdk_signal_support() calls os::signal().
> 
> If only signals added directly by src/hotspot/os/posix/signals_posix.cpp have the warning for a handler changing, then we never had a warning for SIGQUIT, so just this simple change is needed to remove the bogus warning.

Hi Kevin,

Given:

static void check_signal_handler(int sig) {
  char buf[O_BUFLEN];
  bool mismatch = false;

  if (!do_check_signal_periodically[sig]) {
    return;
  }

I don't see how we can get the bogus warning ??

-------------

PR: https://git.openjdk.java.net/jdk/pull/7858


More information about the hotspot-runtime-dev mailing list