zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: PATCH: Very serious bug: Bad pattern in precmd()
Date: Sat, 30 Jun 2001 17:57:58 +0000	[thread overview]
Message-ID: <1010630175759.ZM32420@candle.brasslantern.com> (raw)

Try this only in a debugger or if you have another shell from which you
can kill the first one:

zsh% precmd() { echo [[ }

Zsh goes into an infinite loop printing `precmd: bad pattern: [['.  This
does not happen in 3.0.8, but does happen in 3.1.9 (which is the oldest
3.1.x binary I have around).

This appears to have resulted from moving hbegin() to above preprompt()
in loop() -- hbegin() has the side-effect of resetting `errflag = 0'.
This was my fault, all the way back in article 10168, so it's been around
since 3.1.6-dev-20 without anyone catching it.

Index: Src/init.c
===================================================================
diff -c -r1.3 init.c
--- Src/init.c	2001/04/21 22:22:53	1.3
+++ Src/init.c	2001/06/30 17:51:19
@@ -107,7 +107,6 @@
     pushheap();
     for (;;) {
 	freeheap();
-	errflag = 0;
 	hbegin(1);		/* init history mech        */
 	if (isset(SHINSTDIN)) {
 	    setblock_stdin();
@@ -116,6 +115,7 @@
 		stophist = 3;
 		preprompt();
 		stophist = hstop;
+		errflag = 0;
 	    }
 	}
 	intr();			/* interrupts on            */

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


                 reply	other threads:[~2001-06-30 17:59 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=1010630175759.ZM32420@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.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).