From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15198 invoked by alias); 21 Dec 2012 09:14:39 -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: 30928 Received: (qmail 24151 invoked from network); 21 Dec 2012 09:14:36 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Fri, 21 Dec 2012 17:01:26 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: Re: Segfault in =( ) substitution Message-ID: <20121221090126.GG2464@localhost.localdomain> References: <20121017202030.46014a7a@pws-pc.ntlworld.com> <20121017211603.6189d6f4@pws-pc.ntlworld.com> <20121221075751.GF2464@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121221075751.GF2464@localhost.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12122109-2876-0000-0000-000003647F7F On Fri, Dec 21, 2012 at 03:57:51PM +0800, Han Pingtian wrote: > On Wed, Oct 17, 2012 at 09:16:03PM +0100, Peter Stephenson wrote: > > I suppose it's worth pointing out you can now do things like this... > > > > () { > > print File $1: > > cat $1 > > } =(print This be the verse) > > > > producing: > > > > File /tmp/zsh0wPl3Y: > > This be the verse > > > > That's a better bet than any hack within the shell that I can think of > > because the scoping is obvious. > > > > Hello, > > I just noticed that this example crashed on zsh both 5.0 and 5.0.1. If I > compile zsh with debug enabled, it runs like this: > > % () { > function> print File $1: > function> cat $1 > function> } =(print hello) > File : > cat: : No such file or directory > > Please take a look. Thanks. Looks like if revert the below commit this example will work again: commit ad92cb3203e5d95be91019633e8f1f5835b12794 Author: Peter Stephenson Date: Thu Oct 11 16:36:14 2012 +0000 30724: shell code optimisd to use execsimple() doesn't have a valid thisjob diff --git a/ChangeLog b/ChangeLog index 9768aa8..5a69f01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-10-11 Peter Stephenson + + * 30724: Src/exec.c, Src/jobs.c: shell code optimised to use + execsimple() doesn't have a valid thisjob. + 2012-10-09 Peter Stephenson ... ...