Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57337 - [gdb] crashes after hitting tab when entering a breakpoint

Attached to Project: Arch Linux
Opened by Karl Cronburg (karl) - Friday, 02 February 2018, 16:43 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 03 February 2018, 17:50 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: GDB crashes (core dump) when I type a non-numeric character and then hit tab when inserting a numbered line break point with gdb's "b -l [line]" syntax. (Discovered because I thought "-l" was for label not for line number)

Package version: GDB 8.0.1
Kernel version: 4.14.13-1-ARCH x86_64

Steps to reproduce:
$ gdb ./a.out
(gdb) b -l c[TAB]

Error message: terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'

Stack trace (running gdb in gdb):

Thread 1 "gdb" received signal SIGABRT, Aborted.
0x00007ffff611d860 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff611d860 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff611eec9 in abort () from /usr/lib/libc.so.6
#2 0x0000555555990495 in ?? ()
#3 0x000055555598b2c6 in ?? ()
#4 0x000055555598b939 in ?? ()
#5 0x000055555598ad28 in ?? ()
#6 0x00005555559a1153 in ?? ()
#7 0x00005555559a1c8e in ?? ()
#8 0x00005555557fd4a1 in ?? ()
#9 0x0000555555759778 in ?? ()
#10 0x0000555555758a60 in ?? ()
#11 0x000055555575a134 in ?? ()
#12 0x000055555575a371 in ?? ()
#13 0x00007ffff7baac5e in rl_completion_matches () from /usr/lib/libreadline.so.7
#14 0x00007ffff7baadf6 in gen_completion_matches () from /usr/lib/libreadline.so.7
#15 0x00007ffff7baaf8a in rl_complete_internal () from /usr/lib/libreadline.so.7
#16 0x00007ffff7ba180f in _rl_dispatch_subseq () from /usr/lib/libreadline.so.7
#17 0x00007ffff7ba1cd6 in readline_internal_char () from /usr/lib/libreadline.so.7
#18 0x00007ffff7bba365 in rl_callback_read_char () from /usr/lib/libreadline.so.7
#19 0x00005555557ad378 in ?? ()
#20 0x00005555557ad3f9 in ?? ()
#21 0x00005555557ad9d8 in ?? ()
#22 0x00005555557ac70d in ?? ()
---Type <return> to continue, or q <return> to quit---
#23 0x00005555557ac882 in ?? ()
#24 0x00005555557ac9ef in ?? ()
#25 0x000055555580433b in ?? ()
#26 0x00005555557aec55 in ?? ()
#27 0x000055555580563f in ?? ()
#28 0x00005555555e9bec in ?? ()
#29 0x00007ffff6109f4a in __libc_start_main () from /usr/lib/libc.so.6
#30 0x00005555555ebd9a in ?? ()

Research:

This issue with gdb improperly handling a readline exception appears to be fixed upstream: https://sourceware.org/ml/gdb-patches/2016-04/msg00501.html

And the workaround is to build gdb with "--enable-build-with-cxx=no" or readline with "-fexceptions": http://sourceware-org.1504.n7.nabble.com/GDB-is-broken-on-systems-with-readline-built-without-fexceptions-td391526.html
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 03 February 2018, 17:50 GMT
Reason for closing:  Fixed
Comment by Doug Newgard (Scimmia) - Saturday, 03 February 2018, 17:04 GMT
Is this still an issue with 8.1? The links you've given are old.
Comment by Karl Cronburg (karl) - Saturday, 03 February 2018, 17:43 GMT
Not an issue on 8.1 (I just got the new release on pacman). Thanks!

Loading...