From: Philippe Waroquiers Date: Tue, 25 Jun 2019 20:49:29 +0000 (+0200) Subject: Replace 'error' by 'warning' when a signal cannot be translated to the gdb nr. X-Git-Tag: VALGRIND_3_16_0~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90d831171d3d30df27b2c44dee1c70da3e69511d;p=thirdparty%2Fvalgrind.git Replace 'error' by 'warning' when a signal cannot be translated to the gdb nr. As 'error' is supposed to be called only to go back at gdbserver toplevel, and such signal translations can be called during tracing, when gdbserver is not active : 'error' then tries to longjmp using a not initialised longjmp buffer. (reproduced by activating the trace with the test case attached in bug 409141 - Valgrind hangs when SIGKILLed). --- diff --git a/coregrind/m_gdbserver/signals.c b/coregrind/m_gdbserver/signals.c index 69103ec507..24948a19a4 100644 --- a/coregrind/m_gdbserver/signals.c +++ b/coregrind/m_gdbserver/signals.c @@ -486,8 +486,8 @@ enum target_signal target_signal_from_host (int hostsig) } #endif - error ("Valgrind GDBSERVER bug: (target_signal_from_host):" - " unrecognized vki signal %d\n", hostsig); + warning ("Valgrind GDBSERVER bug: (target_signal_from_host):" + " unrecognized vki signal %d\n", hostsig); return TARGET_SIGNAL_UNKNOWN; } @@ -750,8 +750,8 @@ int do_target_signal_to_host (enum target_signal oursig, return retsig; } #endif - error ("Valgrind GDBSERVER bug: (do_target_signal_to_host):" - " unrecognized target signal %u\n", oursig); + warning ("Valgrind GDBSERVER bug: (do_target_signal_to_host):" + " unrecognized target signal %u\n", oursig); *oursig_ok = 0; return 0; }