zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: zsh hangs.
Date: Thu, 5 Oct 2000 11:24:17 +0200 (MET DST)	[thread overview]
Message-ID: <200010050924.LAA13187@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tanaka Akira's message of 05 Oct 2000 12:28:49 +0900


Tanaka Akira wrote:

> zsh hangs up as follows.
> 
> Z(2):akr@flux% Src/zsh -f
> flux% setopt histnostore<C-j>
> flux% echo a<C-v><C-j>
> /}<C-j>
> zsh: parse error near `}'
> ^C^C^Z^Z

(Sometimes I wonder how you find things like these...)

This was caused by the wrong (or missing) return-value handling in
par_event() when it called itself recursively. That made parse_event() 
return an invalid Eprog and later histnostore made getpermtext() be
called on that.

Bye
 Sven

Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.13
diff -u -r1.13 parse.c
--- Src/parse.c	2000/08/02 18:01:51	1.13
+++ Src/parse.c	2000/10/05 09:21:26
@@ -478,9 +478,10 @@
     } else {
 	int oec = ecused;
 
-	par_event();
-	if (ecused == oec)
+	if (!par_event()) {
+	    ecused = oec;
 	    ecbuf[p] |= wc_bdata(Z_END);
+	}
     }
     return 1;
 }

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


                 reply	other threads:[~2000-10-05  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200010050924.LAA13187@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).