From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4301 invoked from network); 30 Jun 2001 17:59:26 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Jun 2001 17:59:26 -0000 Received: (qmail 26617 invoked by alias); 30 Jun 2001 17:58:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15191 Received: (qmail 26594 invoked from network); 30 Jun 2001 17:58:32 -0000 From: "Bart Schaefer" Message-Id: <1010630175759.ZM32420@candle.brasslantern.com> Date: Sat, 30 Jun 2001 17:57:58 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: PATCH: Very serious bug: Bad pattern in precmd() MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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