public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug cli/29800] New: Trying to "document" an undefined command causes crash
@ 2022-11-17 16:41 hp at sourceware dot org
2022-11-17 17:00 ` [Bug cli/29800] " simon.marchi at polymtl dot ca
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: hp at sourceware dot org @ 2022-11-17 16:41 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
Bug ID: 29800
Summary: Trying to "document" an undefined command causes crash
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: hp at sourceware dot org
Target Milestone: ---
Trying to "document" an undefined (not "define"d yet), causes gdb to crash.
This is a build from git://sourceware.org/git/binutils-gdb.git at
cbda14deaf49.
(All directory names below are manually redacted and may contain typos.)
I checked out gdb-binutils tree, configured with "--prefix /tmp/foo" and built
and installed with "make all" and "make install".
Then, executing /tmp/foo/bin/gdb and just writing "document foo" gets me:
(gdb) document foo
Fatal signal: Segmentation fault
----- Backtrace -----
0x55a2f1388169 gdb_internal_backtrace_1
/path/to/checkout/binutils-gdb-git/gdb/bt-utils.c:122
0x55a2f1388169 _Z22gdb_internal_backtracev
/path/to/checkout/binutils-gdb-git/gdb/bt-utils.c:168
0x55a2f149fa6f handle_fatal_signal
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:964
0x55a2f149fbde handle_sigsegv
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:1037
0x7ff51c00013f ???
./nptl/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x55a2f13cc14e do_document_command
/path/to/checkout/binutils-gdb-git/gdb/cli/cli-script.c:1519
0x55a2f13bbb34 _Z8cmd_funcP16cmd_list_elementPKci
/path/to/checkout/binutils-gdb-git/gdb/cli/cli-decode.c:2543
0x55a2f16c2331 _Z15execute_commandPKci
/path/to/checkout/binutils-gdb-git/gdb/top.c:692
0x55a2f14a081c _Z15command_handlerPKc
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:616
0x55a2f14a0bac
_Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:860
0x55a2f14a11c0 gdb_rl_callback_handler
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:246
0x55a2f176d83f rl_callback_read_char
/path/to/checkout/binutils-gdb-git/readline/readline/callback.c:290
0x55a2f149fc2d gdb_rl_callback_read_char_wrapper_noexcept
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:188
0x55a2f14a10a0 gdb_rl_callback_read_char_wrapper
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:221
0x55a2f149f93f stdin_event_handler
/path/to/checkout/binutils-gdb-git/gdb/event-top.c:541
0x55a2f186fb25 gdb_wait_for_event
/path/to/checkout/binutils-gdb-git/gdbsupport/event-loop.cc:694
0x55a2f1870353 gdb_wait_for_event
/path/to/checkout/binutils-gdb-git/gdbsupport/event-loop.cc:593
0x55a2f1870353 _Z16gdb_do_one_eventi
/path/to/checkout/binutils-gdb-git/gdbsupport/event-loop.cc:264
0x55a2f1575a79 start_event_loop
/path/to/checkout/binutils-gdb-git/gdb/main.c:411
0x55a2f1575a79 captured_command_loop
/path/to/checkout/binutils-gdb-git/gdb/main.c:471
0x55a2f1577564 captured_main
/path/to/checkout/binutils-gdb-git/gdb/main.c:1330
0x55a2f1577564 _Z8gdb_mainP18captured_main_args
/path/to/checkout/binutils-gdb-git/gdb/main.c:1345
0x55a2f12d9f7b main
/path/to/checkout/binutils-gdb-git/gdb/gdb.c:32
---------------------
A fatal error internal to GDB has been detected, further
debugging is not possible. GDB will now terminate.
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
zsh: segmentation fault /foo/bin/bin/gdb
-------
This seems to be a regression from that which Debian packaged, where "gdb
--version" says "GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git", and where the
corresponding "document foo" gets me the somewhat more expected:
-------
(gdb) document foo
Undefined command: "foo". Try "help".
(gdb)
-------
(FWIW, I actually sourced a script, where I had the document and define
switched, but the crashing behavior is AFAICT identical.)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
@ 2022-11-17 17:00 ` simon.marchi at polymtl dot ca
2022-11-18 2:39 ` tromey at sourceware dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: simon.marchi at polymtl dot ca @ 2022-11-17 17:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
Simon Marchi <simon.marchi at polymtl dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |good-first-bug
CC| |simon.marchi at polymtl dot ca
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
2022-11-17 17:00 ` [Bug cli/29800] " simon.marchi at polymtl dot ca
@ 2022-11-18 2:39 ` tromey at sourceware dot org
2022-11-18 16:04 ` tromey at sourceware dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2022-11-18 2:39 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
Target Milestone|--- |13.1
--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Regression.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
2022-11-17 17:00 ` [Bug cli/29800] " simon.marchi at polymtl dot ca
2022-11-18 2:39 ` tromey at sourceware dot org
@ 2022-11-18 16:04 ` tromey at sourceware dot org
2022-11-18 16:06 ` tromey at sourceware dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2022-11-18 16:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Have a patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
` (2 preceding siblings ...)
2022-11-18 16:04 ` tromey at sourceware dot org
@ 2022-11-18 16:06 ` tromey at sourceware dot org
2022-11-28 13:49 ` cvs-commit at gcc dot gnu.org
2022-11-28 13:50 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2022-11-18 16:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2022-November/193967.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
` (3 preceding siblings ...)
2022-11-18 16:06 ` tromey at sourceware dot org
@ 2022-11-28 13:49 ` cvs-commit at gcc dot gnu.org
2022-11-28 13:50 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-28 13:49 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b70e9270fbafd43a3fece0c7dd52cabd70854dfd
commit b70e9270fbafd43a3fece0c7dd52cabd70854dfd
Author: Tom Tromey <tromey@adacore.com>
Date: Fri Nov 18 09:04:39 2022 -0700
Fix crash in "document" command
PR cli/29800 points out that "document" will now crash when the
argument is an undefined command. This is a regression due to the
"document user-defined aliases" patch.
Approved-By: Joel Brobecker <brobecker@adacore.com>
Reviewed-By: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29800
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug cli/29800] Trying to "document" an undefined command causes crash
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
` (4 preceding siblings ...)
2022-11-28 13:49 ` cvs-commit at gcc dot gnu.org
@ 2022-11-28 13:50 ` tromey at sourceware dot org
5 siblings, 0 replies; 7+ messages in thread
From: tromey at sourceware dot org @ 2022-11-28 13:50 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29800
Tom Tromey <tromey at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-28 13:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 16:41 [Bug cli/29800] New: Trying to "document" an undefined command causes crash hp at sourceware dot org
2022-11-17 17:00 ` [Bug cli/29800] " simon.marchi at polymtl dot ca
2022-11-18 2:39 ` tromey at sourceware dot org
2022-11-18 16:04 ` tromey at sourceware dot org
2022-11-18 16:06 ` tromey at sourceware dot org
2022-11-28 13:49 ` cvs-commit at gcc dot gnu.org
2022-11-28 13:50 ` tromey at sourceware dot org
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).