Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug in built-in 'test' under cont $CONTEXT
- X-seq: zsh-workers 27077
- From: Takahiro SUZUKI <takahiro.suzuki.ja@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Bug in built-in 'test' under cont $CONTEXT
- Date: Wed, 01 Jul 2009 07:06:09 +0900
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=QN0UfbeG2d1h5N1lE+h8mg8b7/COWnzp8kBfhVkRj9M=; b=j9JMFgWZEG2+YwrSQJ/xHB/1bl3QO4NPaaB8Kn4vPi19MELSYS9YoVqlzHs1pYeLuV 5NUoLwVSb5qAwhISCCqJqpq9npR09pClJ5wJgu4z6tlGqjt1JAdhPIbSMFlMDhDQpCvi CR+iFntSPZS7v2HYILNx3RxzIt1Zq0ofYoxLs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=tess/4QY5L7yuFhs0LxkbLKicSmgiZ3/Jc6eI7G3I/Nj59TMVguTj7+ZVqEoGF52Pk 4NfUaxebBKG8uHuVKfpaTd7v7doIunNj6VSnB5hmzBhF+oAPgf+oT8IL8S/vNE3adtom rY4PU3dAXwC8EYU+IswGLyW/EXbmWZafl6USE=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Hi all,
I found a bug in builtin test command under $CONTEXT=="cont".
Using builtin test command via zle widget when zsh is pending for "for",
the shell fails with segmentation fault. This does not occur when using
/usr/bin/test instead, so I guess it is a problem of zsh.
REPRO:
% zsh -f
myhost% source zshrc_segv
myhost% for i in; [test2 called]
for> do [test2 called]
for> echo [test2 called]
for> done [test2 called]
myhost% for i in; [test1 called]
for> do [test1 called]
for> echo [test1 called]
zsh: segmentation fault zsh -f
% cat zshrc_segv
function test1 {
# calling in $CONTEXT=cont will crash zsh
echo -n ' [test1 called]'
test -n ""
}
function test2 {
# but this won't
echo -n ' [test2 called]'
/usr/bin/test -n ""
}
zle -N test1
zle -N test2
bindkey '^T' test1
bindkey '^[t' test2
VERSION: (ubuntu server 8.04 x86)
zsh 4.3.4 (i686-pc-linux-gnu)
--
Takahiro Suzuki
Messages sorted by:
Reverse Date,
Date,
Thread,
Author