zsh-workers
 help / color / mirror / code / Atom feed
* Obscure UTF-8 bug in parameter expansion?
@ 2005-09-05 19:25 Bart Schaefer
  2005-09-05 21:42 ` Obscure [not UTF-8] " Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2005-09-05 19:25 UTC (permalink / raw)
  To: zsh-workers

(See zsh-users/9389 for background.)

Using the latest zsh from CVS, I was just trying out the command

	zargs -- sur pur -- echo {} -foo bar

and zargs went into an infinite loop.  I found this rather baffling,
as it had been pretty thoroughly tested, so I ran it with `set -x' and
encountered this:

[...]
: zargs:233; s=20480 
: zargs:234; l=ÿ 
[...]

The assignment to `l' there should always be a number, unless one has
abused the --max-lines option.  The actual declaration/assignment is:

local -a opts eof n s l P i
# An intervening zparseopts call may assign to l or may not
l=${${${l##*-(l|L|-max-lines(=|))}[-1]}:-${${l[1]:+1}:-$ARGC}}

So apparently when `l' should be the empty array (as it was declared on
line 68) it is instead the garbage string y-with-an-umlaut.  I'm pretty
sure this did not occur before --enable-multibyte became the default.
However, recompiling with --disable-multibyte doesn't change anything,
so the problem may be in code that changed independent of the multibyte
support.


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

end of thread, other threads:[~2005-09-06 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-05 19:25 Obscure UTF-8 bug in parameter expansion? Bart Schaefer
2005-09-05 21:42 ` Obscure [not UTF-8] " Bart Schaefer
2005-09-06 10:16   ` Peter Stephenson
2005-09-06 15:06     ` Bart Schaefer

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).