Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
More incmdpos stuff Re: Crash Re: Trial for 5.0.7
- X-seq: zsh-workers 33342
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: More incmdpos stuff Re: Crash Re: Trial for 5.0.7
- Date: Fri, 3 Oct 2014 13:47:25 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=71kT27x2d3/YjiCWxSWGblieJlJqtm0ml3B+KPkNeIA=; b=T/+rDkdUdncpPMgo+QS3+EnkqkQklhlCyH+GleMkyiW2CAbKyLKsbxce/9CAGjsjSb e2FFrmvnTNgyfC36i5yGQA6oBUqSfbC/rtKB9bEfCLcwS8320Y2ZjxGbbvZchhvHBAF1 5CrVPl4JVBtDg5PZW8CFQAKgAhoxisA7lbuGH/y+KjWRdzDgPnzg/Gv4OKc+Vu3f0Vsw w2gZxFmA/y1n7dxjFueFzvMU73IUfGEQ38TCpATc5RCZFR6TrVTjV77v5R6omdAsa443 n+AdM8QEw/CmsRHDAR4pbSItz+HEicdTV88X2wfQpEH9v2AJVDN/oHBnZoyMC8LqHFPZ Qgsg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
On 3 October 2014 10:58, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Thu, 02 Oct 2014 21:58:56 -0700
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> On Oct 2, 8:33pm, Bart Schaefer wrote:
>> }
>> } git-bisect says this is the bad revision:
>> }
>> } commit 8189e12312ede991827efc6683b7ce8463deb0bf
>> }
>> } 32552 (updated by 32560): fix segfault when using process substitution in
>> } anonymous function argument list
>> }
>> } Also disallow process substitution in function name position.
>>
>> OK, I've narrowed it down to the parse.c hunks of the patch. Remove
>> just that change, and the crash on piping to an anonymous function is
>> fixed, but this test fails:
>>
>> ./C04funcdef.ztst: starting.
>> Test ./C04funcdef.ztst failed: bad status 1, expected 0 from:
>> () (cat $1 $2) <(print process expanded) =(print expanded to file)
>> Error output:
>> (eval):1: process substitution <(print process expanded) cannot be used here
>> Was testing: Process substitution with anonymous functions
>> ./C04funcdef.ztst: test failed.
>>
>> Here's the patch to revert workers/32552 (parse.c). I haven't figured
>> out why fiddling with *complex here mangles the wordcode, some help is
>> appreciated. Obviously the above test needs to pass.
>
> (I presume that *is* an anonymous function, I'd forgotten that
> functions could be defined with parentheses for the bodies. Presumably
> using braces makes no difference, though?)
% () ( echo hi; echo $@ ) ls
hi
ls --color=auto -T 0 -A -v --quoting-style=shell
I thought "aha, pws recently fixed something like this so I can just
look at that commit and fix it", but then I looked at the code.
With shortloops set, you can also do the following;
% () for a; ( echo hi; echo $a ) ls
hi
ls
hi
--color=auto
hi
-T
hi
0
hi
-A
hi
-v
hi
--quoting-style=shell
% () for a ( echo hi; echo $a ) ls
.cvsignore Completion META-FAQ Test config.h.in
install-sh
[quadruple file listing elided (why four, you say? i don't know, ls is
aliased to two words, \ls $LS_OPTIONS, the second expands to 6
words.)]
(This is why i don't have shortloops set, every syntax error does
something random instead). The second result of actually running ls
happens even without the anon function, eg just
% for a ( echo hi; echo $a ) ls
does it.
% for a; ( echo hi; echo $a ) ls
zsh: parse error near `ls'
--
Mikael Magnusson
ecadd(0);
ecadd(0);
ecadd(0);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author