[PATCH] Guard against killing unrelated processes in amd64-disp-step.exp
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Thu Jul 13 11:19:55 GMT 2023
When testing current gdb trunk on Solaris/amd64, the whole session was
reliably terminated by make check. I could trace this to the following
entry in gdb.arch/amd64-disp-step/gdb.log:
FAIL: gdb.arch/amd64-disp-step.exp: add into rcx: send_signal=on: get inferior pid
Executing on target: kill -ALRM -1 (timeout = 300)
builtin_spawn -ignore SIGHUP kill -ALRM -1
If $inferior_pid doesn't refer a single process for some reason, this
kill would terminate either a process group or the whole session.
This patch avoids this by ensuring that the pid arg is positive.
Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu.
Ok for trunk?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol2-amd64-random-kill.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20230713/239bc64e/attachment.bin>
More information about the Gdb-patches
mailing list