zsh-workers
 help / color / mirror / code / Atom feed
* Bug in built-in 'test' under cont $CONTEXT
@ 2009-06-30 22:06 Takahiro SUZUKI
  2009-06-30 23:31 ` Mikael Magnusson
  2009-07-01  8:59 ` Peter Stephenson
  0 siblings, 2 replies; 3+ messages in thread
From: Takahiro SUZUKI @ 2009-06-30 22:06 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-01  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 22:06 Bug in built-in 'test' under cont $CONTEXT Takahiro SUZUKI
2009-06-30 23:31 ` Mikael Magnusson
2009-07-01  8:59 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).