NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/55053: gdb chokes on shell syntax errors when running debuggee



>Number:         55053
>Category:       toolchain
>Synopsis:       gdb chokes on shell syntax errors when running debuggee
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 07 10:50:00 +0000 2020
>Originator:     David Holland
>Release:        NetBSD 9.99.42 (20200126)
>Organization:
>Environment:
System: NetBSD macaran 9.99.42 NetBSD 9.99.42 (MACARAN) #58: Fri Feb 7 22:38:20 EST 2020 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:

gdb explodes if you try to pass a subprocess command line args that
contain shell syntax errors, e.g. unquoted parens or a dangling <.

>How-To-Repeat:

% gdb hello
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
   :
   :
   :
Reading symbols from foo...
(gdb) r abc (def)
Starting program: /tmp/foo/foo abc (def)
Badly placed ()'s.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2170: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2170: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n

Note that the problem is caused by the shell dying.

It is fairly easy to trigger this problem by accident if you happen to
have a file with parentheses in its name, because the readline tab
completion in gdb's command line will fill in the file's full name
without quoting or expanding the parentheses.

>Fix:



Home | Main Index | Thread Index | Old Index