]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Replace 'error' by 'warning' when a signal cannot be translated to the gdb nr.
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 25 Jun 2019 20:49:29 +0000 (22:49 +0200)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Tue, 25 Jun 2019 20:49:29 +0000 (22:49 +0200)
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).

coregrind/m_gdbserver/signals.c

index 69103ec5075b969ac8789a2b291e26dab0471a5d..24948a19a46381f5c073615a92a22a03ddd08771 100644 (file)
@@ -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;
    }