From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18609 invoked from network); 23 Oct 2005 19:38:56 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Oct 2005 19:38:56 -0000 Received: (qmail 29671 invoked from network); 23 Oct 2005 19:38:50 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Oct 2005 19:38:50 -0000 Received: (qmail 19129 invoked by alias); 23 Oct 2005 19:38:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21910 Received: (qmail 19119 invoked from network); 23 Oct 2005 19:38:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Oct 2005 19:38:44 -0000 Received: (qmail 29272 invoked from network); 23 Oct 2005 19:38:44 -0000 Received: from mta07-winn.ispmail.ntl.com (81.103.221.47) by a.mx.sunsite.dk with SMTP; 23 Oct 2005 19:38:42 -0000 Received: from aamta09-winn.ispmail.ntl.com ([81.103.221.35]) by mta07-winn.ispmail.ntl.com with ESMTP id <20051023193839.ONAJ21883.mta07-winn.ispmail.ntl.com@aamta09-winn.ispmail.ntl.com> for ; Sun, 23 Oct 2005 20:38:39 +0100 Received: from pwslaptop.csr.com ([81.105.238.64]) by aamta09-winn.ispmail.ntl.com with SMTP id <20051023193841.XOCV6564.aamta09-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Sun, 23 Oct 2005 20:38:41 +0100 Date: Sun, 23 Oct 2005 20:38:37 +0100 From: Peter Stephenson To: zsh-workers Subject: Re: Crash in copy-earlier-word Message-Id: <20051023203837.6d871a4b.p.w.stephenson@ntlworld.com> In-Reply-To: <237967ef0510220929p651a40b5od5741245092394a1@mail.gmail.com> References: <237967ef0510220929p651a40b5od5741245092394a1@mail.gmail.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 On Sat, 22 Oct 2005 18:29:04 +0200 Mikael Magnusson wrote: > If i type a few words and then press copy-earlier-word a few times, i > get this backtrace. seems to be at or after it reaches the first word > on the line. Thanks for spotting another one: this was was because insertlastword() wasn__t consistently remetafying the line if it returned in error. I__ve added another UMETACHECK() in the handler for the zle builtin so that this sort of problem emerges a bit earlier. I__ve already committed this because of problems with my ISP__s mail server. Index: Src/Zle/zle_hist.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v retrieving revision 1.28 diff -u -r1.28 zle_hist.c --- Src/Zle/zle_hist.c 26 Sep 2005 18:39:21 -0000 1.28 +++ Src/Zle/zle_hist.c 23 Oct 2005 17:14:57 -0000 @@ -577,13 +577,17 @@ * a deleted word, because that can only have come * from a non-empty line. I think. */ - if (!(l =3D bufferwords(NULL, NULL, NULL))) + if (!(l =3D bufferwords(NULL, NULL, NULL))) { + unmetafy_line(); return 1; + } nwords =3D countlinknodes(l); } else { /* Some stored line. */ - if (!(he =3D quietgethist(evhist)) || !he->nwords) + if (!(he =3D quietgethist(evhist)) || !he->nwords) { + unmetafy_line(); return 1; + } nwords =3D he->nwords; } if (wordpos) { @@ -602,6 +606,7 @@ * has not changed, and lastinsert is still valid. */ lasthist =3D evhist; + unmetafy_line(); return 1; } /* Index: Src/Zle/zle_thingy.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_thingy.c,v retrieving revision 1.19 diff -u -r1.19 zle_thingy.c --- Src/Zle/zle_thingy.c 29 Sep 2005 17:32:38 -0000 1.19 +++ Src/Zle/zle_thingy.c 23 Oct 2005 17:14:58 -0000 @@ -358,6 +358,8 @@ struct opn const *op, *opp; int n; =20 + UNMETACHECK(); + /* select operation and ensure no clashing arguments */ for(op =3D opns; op->o && !OPT_ISSET(ops,STOUC(op->o)); op++) ; if(op->o)