zsh-workers
 help / color / mirror / code / Atom feed
* Crash with "fc -I" and/or zshaddhistory hook
@ 2014-07-20 18:20 Bart Schaefer
  0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2014-07-20 18:20 UTC (permalink / raw)
  To: zsh-workers

I was fiddling with this:

zshaddhistory() { return 2 }
precmd() { [[ $? != 127 ]] && fc -I }

(yes, that's a typo, I meant -AI)

HISTSIZE=10 SAVEHIST=10 HISTFILE=/tmp/testhist

I got

precmd:fc: no such event: 10                                                    

and was confused (because I hadn't noticed the typo) so I hit enter several
times, eventually typed an actual command, and

precmd:fc: no such event: 10                                                    
torch% 
precmd:fc: no such event: 10                                                    
torch% 
precmd:fc: no such event: 10                                                    
torch% 
precmd:fc: no such event: 10                                                    
torch% echo foo
*** glibc detected *** double free or corruption (fasttop): 0x08a71a90 ***
zsh: abort (core dumped)  Src/zsh -f

I sort of suspect the problem is related to the history being completely
empty because zshaddhistory always returns 2, but why was "fc -I" trying
to select an event rather than just giving an error?

-- 
Barton E. Schaefer


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-20 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 18:20 Crash with "fc -I" and/or zshaddhistory hook Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).