zsh-workers
 help / color / mirror / code / Atom feed
* two new bugs
@ 1996-09-18  9:27 Peter Stephenson
  1996-09-18 12:26 ` Peter Stephenson
  1996-09-18 22:12 ` Zoltan Hidvegi
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Stephenson @ 1996-09-18  9:27 UTC (permalink / raw)
  To: Zsh hackers list

Here are two recent bugs, both certainly since 3.0.0, the second very
recent.

1)

% foo[1]=bar
zsh: command not found: foo[1]=bar

(Did this come with Zoltan's patch to fix the bug that '1foo=bar'
worked like '1=bar'?  Unfortunately I've since deleted that.)

2)

% fn() { if true; then functions fn | less; fi; }
% fn
zsh: 14277 done                    functions fn | 
zsh: 14278 suspended (tty output)  less

The second process only responds to kill -9.  I can't offhand see
which patch might have caused this.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


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

* Re: two new bugs
  1996-09-18  9:27 two new bugs Peter Stephenson
@ 1996-09-18 12:26 ` Peter Stephenson
  1996-09-18 21:37   ` Zoltan Hidvegi
  1996-09-18 22:12 ` Zoltan Hidvegi
  1 sibling, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 1996-09-18 12:26 UTC (permalink / raw)
  To: Zsh hackers list

I wrote:
> 2)
> 
> % fn() { if true; then functions fn | less; fi; }
> % fn
> zsh: 14277 done                    functions fn | 
> zsh: 14278 suspended (tty output)  less

There's a race condition here.  This makes it rather nastily system
dependent exactly how it shows up.  I also sometimes get the
right output, but instead of being piped through less it simply ends
up dumped to the terminal, with a status of 1 returned.  These tests
were on IRIX 5.3; with SunOS 5.5 I can't get it to show up at all.

It also means that it's not as new as I'd thought, just the symptoms
show up differently, so it may well have been in 3.0.1-test1 as
distributed.  However, backing out Zoltan's patch for performance,
archive/latest/2064, did not remove it.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


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

* Re: two new bugs
  1996-09-18 12:26 ` Peter Stephenson
@ 1996-09-18 21:37   ` Zoltan Hidvegi
  1996-09-19  7:52     ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Zoltan Hidvegi @ 1996-09-18 21:37 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hacking and development

> I wrote:
> > 2)
> > 
> > % fn() { if true; then functions fn | less; fi; }
> > % fn
> > zsh: 14277 done                    functions fn | 
> > zsh: 14278 suspended (tty output)  less
> 
> There's a race condition here.  This makes it rather nastily system
> dependent exactly how it shows up.  I also sometimes get the
> right output, but instead of being piped through less it simply ends
> up dumped to the terminal, with a status of 1 returned.  These tests
> were on IRIX 5.3; with SunOS 5.5 I can't get it to show up at all.

Didn't you applied my experimental patch do remove pipe synchronization
from exec.c?  That may cause excatly the problem you describe above I
suppose.

If you didn't I can test it on IRIX 5.3 but this week I have no time at
all.

Zoltan


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

* Re: two new bugs
  1996-09-18  9:27 two new bugs Peter Stephenson
  1996-09-18 12:26 ` Peter Stephenson
@ 1996-09-18 22:12 ` Zoltan Hidvegi
  1 sibling, 0 replies; 5+ messages in thread
From: Zoltan Hidvegi @ 1996-09-18 22:12 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

> Here are two recent bugs, both certainly since 3.0.0, the second very
> recent.
> 
> 1)
> 
> % foo[1]=bar
> zsh: command not found: foo[1]=bar
> 
> (Did this come with Zoltan's patch to fix the bug that '1foo=bar'
> worked like '1=bar'?  Unfortunately I've since deleted that.)

Yes, it was my patch :-(.  Here is a fix for the fix.  Note that 1[1]=foo
is not an assignment.

Zoltan


*** Src/lex.c	1996/09/14 03:55:08	2.45
--- Src/lex.c	1996/09/18 22:08:52
***************
*** 859,870 ****
  		}
  	    } else if (!sub && peek != ENVSTRING &&
  		       incmdpos && !bct && !brct) {
! 		e = 0;
! 		if (idigit(*tokstr))
! 		    while (++e < len && idigit(tokstr[e]));
! 		else
! 		    while (iident(tokstr[e]) && ++e < len);
! 		if (e == len) {
  		    e = hgetc();
  		    if (e == '(' && incmdpos) {
  			*bptr = '\0';
--- 859,875 ----
  		}
  	    } else if (!sub && peek != ENVSTRING &&
  		       incmdpos && !bct && !brct) {
! 		char *t = tokstr;
! 		if (idigit(*t))
! 		    while (++t < bptr && idigit(*t));
! 		else {
! 		    while (iident(*t) && ++t < bptr);
! 		    if (t < bptr) {
! 			*bptr = '\0';
! 			skipparens(Inbrack, Outbrack, &t);
! 		    }
! 		}
! 		if (t == bptr) {
  		    e = hgetc();
  		    if (e == '(' && incmdpos) {
  			*bptr = '\0';


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

* Re: two new bugs
  1996-09-18 21:37   ` Zoltan Hidvegi
@ 1996-09-19  7:52     ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 1996-09-19  7:52 UTC (permalink / raw)
  To: Zsh hackers list

Zoltan Hidvegi wrote:
> > > % fn() { if true; then functions fn | less; fi; }
> > > % fn
> > > zsh: 14277 done                    functions fn | 
> > > zsh: 14278 suspended (tty output)  less
> 
> Didn't you applied my experimental patch do remove pipe synchronization
> from exec.c?  That may cause excatly the problem you describe above I
> suppose.

I went right back to a plain 3.0.0 and discovered it's there.  That's
unfortunate since it could be very hard to track down.

-- 
Peter Stephenson <pws@ifh.de>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.


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

end of thread, other threads:[~1996-09-19  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-18  9:27 two new bugs Peter Stephenson
1996-09-18 12:26 ` Peter Stephenson
1996-09-18 21:37   ` Zoltan Hidvegi
1996-09-19  7:52     ` Peter Stephenson
1996-09-18 22:12 ` Zoltan Hidvegi

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