From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25170 invoked from network); 23 Apr 2007 16:40:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Apr 2007 16:40:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 61024 invoked from network); 23 Apr 2007 16:40:45 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Apr 2007 16:40:45 -0000 Received: (qmail 16524 invoked by alias); 23 Apr 2007 16:40:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23312 Received: (qmail 16401 invoked from network); 23 Apr 2007 16:40:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Apr 2007 16:40:37 -0000 Received: (qmail 60149 invoked from network); 23 Apr 2007 16:40:37 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 23 Apr 2007 16:40:34 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly30d.srv.mailcontrol.com (MailControl) with ESMTP id l3NGeT5F006462 for ; Mon, 23 Apr 2007 17:40:30 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 23 Apr 2007 17:40:29 +0100 Date: Mon, 23 Apr 2007 17:40:29 +0100 From: Peter Stephenson To: "Zsh hackers list" Subject: Re: zsh 4.3.4 released Message-Id: <20070423174029.1e8293a9.pws@csr.com> In-Reply-To: <237967ef0704230900r21af3aa1od42cd0b41abe2251@mail.gmail.com> References: <200704161647.l3GGl2FE027950@news01.csr.com> <20070419120758.e9774528.pws@csr.com> <237967ef0704201440g1c072ca8l451439d2ec8578bf@mail.gmail.com> <20070423104151.1f5f368e.pws@csr.com> <237967ef0704230550k41ddb13fy60deebd526ecc5ec@mail.gmail.com> <200704231318.l3NDIONr006499@news01.csr.com> <237967ef0704230722u7546461ehd6b3280df79352a0@mail.gmail.com> <200704231506.l3NF6Njx011759@news01.csr.com> <237967ef0704230900r21af3aa1od42cd0b41abe2251@mail.gmail.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.10 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Apr 2007 16:40:29.0192 (UTC) FILETIME=[1A23C880:01C785C6] X-Scanned-By: MailControl A-06-00-00 (www.mailcontrol.com) on 10.68.0.140 "Mikael Magnusson" wrote: > > Is it possibly you have old wordcode for the dot file that might define > > svmode? (Obviously the shell should be robust even if this is the case; > > since the wordcode has a version stamp this shouldn't happen with a > > released version of the shell.) > > Aha, this seems to have been the problem. I renamed my .zshurxvt.zwc > and it doesn't crash anymore. I always run zrecompile -p on all my .z* > files after upgrading zsh but apparently it only takes effect if the > .file is newer than the .file.zwc, maybe it should also take effect if > $SHELL is newer than the .zwc? I think I've found the problem: parse.c doesn't get recompiled when version.h changes, so zcompile might output the wrong version, so the shell can't check properly when the ZWC file is loaded. Luckily, this won't happen if the shell is built from scratch, so it doesn't affect the fast majority of installed versions. I think the fix is as simple as changing the dependency, though I decided I felt happier if the header for the ZWC file had uninitialised bits set to null bytes rather than (say) the password that was lying around in memory. Thanks for your help. Index: Src/parse.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/parse.c,v retrieving revision 1.60 diff -u -r1.60 parse.c --- Src/parse.c 19 Jan 2007 21:36:03 -0000 1.60 +++ Src/parse.c 23 Apr 2007 16:36:30 -0000 @@ -2693,6 +2693,8 @@ if (map == 1) map = (tlen >= FD_MINMAP); + memset(pre, 0, sizeof(wordcode) * FD_PRELEN) + for (ohlen = hlen; ; hlen = ohlen) { fdmagic(pre) = (other ? FD_OMAGIC : FD_MAGIC); fdsetflags(pre, ((map ? FDF_MAP : 0) | other)); Index: Src/zsh.mdd =================================================================== RCS file: /cvsroot/zsh/zsh/Src/zsh.mdd,v retrieving revision 1.15 diff -u -r1.15 zsh.mdd --- Src/zsh.mdd 21 Jan 2007 22:47:41 -0000 1.15 +++ Src/zsh.mdd 23 Apr 2007 16:36:30 -0000 @@ -31,7 +31,7 @@ init.o: bltinmods.list zshpaths.h zshxmods.h -init.o params.o: version.h +init.o params.o parse.o: version.h version.h: $(sdir_top)/Config/version.mk echo '#define ZSH_VERSION "'$(VERSION)'"' > $@ -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview