public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/breakpoints] Fix sigsegv in info prog at exec catchpoint
@ 2018-07-25 23:11 sergiodj+buildbot
  2018-07-25 23:11 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sergiodj+buildbot @ 2018-07-25 23:11 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 9e7f3bbbbf5a13e879a4cc3cfa958412ffac0d9d ***

Author: Tom de Vries <tdevries@suse.de>
Branch: master
Commit: 9e7f3bbbbf5a13e879a4cc3cfa958412ffac0d9d

[gdb/breakpoints] Fix sigsegv in info prog at exec catchpoint

With the test-case contained in this patch and compiled for debug we run into
a segfault with trunk gdb:
...
$ gdb catch-follow-exec -batch -ex "catch exec" \
  -ex "set follow-exec-mode new" -ex "run" -ex "info prog"
Catchpoint 1 (exec)
process xxx is executing new program: /usr/bin/ls
[New inferior 2 (process 0)]
[New process xxx]

Thread 2.1 "ls" hit Catchpoint 1 (exec'd /usr/bin/ls), in _start () from
  /lib64/ld-linux-x86-64.so.2
Segmentation fault (core dumped)
...

The patch fixes the segfault by returning an error in info_program_command
if get_last_target_status returns minus_one_ptid.

The test-case is non-standard, because the standard approach runs into
PR23368, a problem with gdb going to the background.

Build and reg-tested on x86_64-linux.

2018-07-26  Tom de Vries  <tdevries@suse.de>

	PR breakpoints/23366
	* infcmd.c (info_program_command): Handle ptid == minus_one_ptid.

	* gdb.base/catch-follow-exec.c: New test.
	* gdb.base/catch-follow-exec.exp: New file.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-08-30  9:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 23:11 [binutils-gdb] [gdb/breakpoints] Fix sigsegv in info prog at exec catchpoint sergiodj+buildbot
2018-07-25 23:11 ` Failures on RHEL-s390x-m64, branch master sergiodj+buildbot
2018-07-26  0:33 ` Failures on Fedora-i686, " sergiodj+buildbot
2018-07-26  0:49 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2018-07-26  0:50 ` *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE *** sergiodj+buildbot
2018-07-26  1:05 ` Failures on Fedora-x86_64-m64, branch master sergiodj+buildbot
2018-07-26  1:17 ` Failures on Debian-s390x-native-gdbserver-m64, " sergiodj+buildbot
2018-07-26  1:17 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2018-07-26  1:32 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2018-07-26  1:33 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2018-07-26  2:02 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2018-08-17  5:29 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2018-08-30 13:59 ` Failures on Fedora-s390x-m64, " sergiodj+buildbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).