Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16375

Re: core dump an alt. alt1 alt.

From Mike Jonkmans <bashbug@jonkmans.nl>
Newsgroups gnu.bash.bug
Subject Re: core dump an alt. alt1 alt.
Date 2020-06-09 11:19 +0200
Message-ID <mailman.1488.1591694366.2541.bug-bash@gnu.org> (permalink)
References <20200608225428.9A3DB1257DF@mail.jonkmans.nl> <1c35c79d-3a73-2204-8814-16ba46f4f5aa@case.edu> <20200609091918.GA21994@jonkmans.nl>

Show all headers | View raw


On Mon, Jun 08, 2020 at 08:43:31PM -0400, Chet Ramey wrote:
> 
> On 6/8/20 6:54 PM, bashbug@jonkmans.nl wrote:
> 
> > Bash Version: 4.4
> > Patch Level: 20
> > Release Status: release
> > 
> > Description:
> > 	Got a core dump (segmentation fault) when i type: Alt-. Alt-1 Alt-.
> 
> You tried to redo `.'. The way this happens is you are in command mode,
> run that yank-last-arg binding (which sets the last vi-mode command to
> `.'), then try to run it again, but miss the timeout described in the last
> paragraph of my previous message, which results in you trying to redo the
> last command (`.') in a context where the binding for `.' is vi-redo. I put
> something in to stop that at the same time I made the other changes
> described in my previous message.

The problem from the previous message was the trigger to try this. :)

Are you sure that it is a timeout problem in this case?
Because if I prepend the followong line to the inputrc:
	set keyseq-timeout 0
the core dump is also generated.

It seems i enter command mode after I press Alt-1.
The following Alt-. probably gets split into Alt(Escape) and a '.'
The Escape breaks off the Alt-1 'mode' and then the '.' becomes vi-redo.
But I fail to see why the vi-redo is bound to vi-redo here. :(

With this inputrc:
	set keyseq-timeout 0
	set editing-mode vi
	set keymap vi-command
	set show-mode-in-prompt on
	set vi-ins-mode-string "+ "
	set vi-cmd-mode-string ": "
	"\e.": yank-last-arg
	set keymap vi-insert
	"\e.": yank-last-arg

Another, maybe clearer case, typing: Alt-. Esc .
a core dump is also generated.
My expectation would be that:
- Alt-. insert text
- Esc goes to vi-command mode
- . does vi-redo, which is, insert the same text as Alt-. did

Regards,

-- 
Mike Jonkmans <bashbug@jonkmans.nl>

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: core dump an alt. alt1 alt. Mike Jonkmans <bashbug@jonkmans.nl> - 2020-06-09 11:19 +0200

csiph-web