From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12821 invoked from network); 16 Aug 2009 19:08:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 16 Aug 2009 19:08:15 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 43339 invoked from network); 16 Aug 2009 19:01:32 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Aug 2009 19:01:32 -0000 Received: (qmail 4914 invoked by alias); 16 Aug 2009 19:01:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27216 Received: (qmail 4885 invoked from network); 16 Aug 2009 19:01:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 16 Aug 2009 19:01:23 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id 2F9DC810A4D9 for ; Sun, 16 Aug 2009 21:01:19 +0200 (CEST) Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090816190114.BGCT6742.mtaout01-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Sun, 16 Aug 2009 20:01:14 +0100 Received: from pws-pc ([82.6.98.90]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090816190111.XGMZ2093.aamtaout03-winn.ispmail.ntl.com@pws-pc>; Sun, 16 Aug 2009 20:01:11 +0100 Date: Sun, 16 Aug 2009 20:01:03 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Cc: 535232@bugs.debian.org Subject: Re: Bug#535232: zsh: segfaults while trying to free in hend Message-ID: <20090816200103.78034230@pws-pc> In-Reply-To: <20090809184721.GA10870@scru.org> References: <20090630222133.8940.9856.reportbug@deng-aberr.internal.itasoftware.com> <20090809184721.GA10870@scru.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=8OzOUqLBYSAA:10 a=xNf9USuDAAAA:8 a=NLZqzBF-AAAA:8 a=pgtoCNhItXB-OnqShawA:9 a=HfbbtierZrkYVSxwjz8A:7 a=h8GZmckYiAVW6oGJ7Z769XR2p6wA:4 a=YPTUPuSgPjgA:10 a=_dQi-Dcv4p4A:10 X-Virus-Scanned: ClamAV 0.94.2/9703/Sun Aug 16 06:03:32 2009 on bifrost X-Virus-Status: Clean On Sun, 9 Aug 2009 18:47:21 +0000 Clint Adams wrote: > On Tue, Jun 30, 2009 at 06:21:33PM -0400, Alec Berryman wrote: >> Recently (one or two weeks, probably when I upgraded to the current >> version of zsh), I've been seeing intermittent segfaults - I'll run a >> command like less or cd and my terminal will die on me. I've never >> seen it happen in a long-running shell; if it makes it through the >> first few commands, everything works. The following is at least safe and good practice, but it's impossible to tell if it's the root of the problem. Index: Src/hist.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/hist.c,v retrieving revision 1.94 diff -u -r1.94 hist.c --- Src/hist.c 23 Mar 2009 12:17:33 -0000 1.94 +++ Src/hist.c 16 Aug 2009 18:59:10 -0000 @@ -1156,6 +1156,7 @@ zfree(chline, hlinesz); zfree(chwords, chwordlen*sizeof(short)); chline = NULL; + chwords = NULL; histactive = 0; unqueue_signals(); return 1; @@ -1270,6 +1271,7 @@ zfree(chline, hlinesz); zfree(chwords, chwordlen*sizeof(short)); chline = NULL; + chwords = NULL; histactive = 0; if (isset(SHAREHISTORY)? histfileIsLocked() : isset(INCAPPENDHISTORY)) savehistfile(hf, 0, HFILE_USE_OPTIONS | HFILE_FAST); -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/