From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13453 invoked by alias); 20 Jul 2014 18:20:41 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32892 Received: (qmail 20122 invoked from network); 20 Jul 2014 18:20:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,FROM_12LTRDOM, RCVD_IN_DNSWL_NONE,T_MANY_HDRS_LCASE autolearn=no version=3.3.2 From: Bart Schaefer Message-id: <140720112029.ZM20364@torch.brasslantern.com> Date: Sun, 20 Jul 2014 11:20:29 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Crash with "fc -I" and/or zshaddhistory hook MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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