This was reported for Debian in https://bugs.debian.org/968703 for the interactive Python interpreter, however I also see it with gdb, e.g. trying to run ls in gdb. readline 8.1 is in use.
$ cat .inputrc # Based on Brendan Miller's initial bash .inputrc # INSTALL # to install, rename this file to just ".inputrc" # place this file in your home dir. e.g. ~/.inputrc # restart your terminal. Then, bash's keybinding for editing # should be like ErgoEmacs. # If no key works, try replace all \e to \M-. That's means change Esc to Meta key. set editing-mode emacs "\M-j": backward-char "\M-l": forward-char "\M-u": backward-word "\C-M-b": backward-word "\M-o": forward-word "\C-M-f": forward-word "\M-g": kill-line "\<S-delete>": kill-line "\M-e": backward-kill-word "\M-r": kill-word "\M-f": delete-char "\C-z": undo "\<S-delete>": kill-region "\M-c": copy-region-as-kill "\<S-insertchar>": yank "\C-v": yank "\C-f": forward-search-history "\M-:": reverse-search-history just hitting return in interactive mode triggers the segfault.