From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id CAA02538 for ; Mon, 8 Jul 1996 02:22:07 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA25383; Sun, 7 Jul 1996 12:15:58 -0400 (EDT) Resent-Date: Sun, 7 Jul 1996 12:15:58 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960707091640.ZM4171@candle.brasslantern.com> Date: Sun, 7 Jul 1996 09:16:34 -0700 In-Reply-To: Andreas Koenig "Re: zsh-3.0-pre2 cores on irix 5.3 (?)" (Jul 7, 12:50pm) References: <199607071050.MAA00891@anna.in-berlin.de> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: andreas.koenig@franz.ww.tu-berlin.de Subject: Re: zsh-3.0-pre2 cores on irix 5.3 (?) Cc: zsh-workers@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Resent-Message-ID: <"4jYkG2.0.XC6.zA-tn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1551 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 7, 12:50pm, Andreas Koenig wrote: } Subject: Re: zsh-3.0-pre2 cores on irix 5.3 (?) } } I started investigating, and reduced the bug (see below) } = } > 1. Do you start getting the `alloc_stackp !=3D 0' error immediately= upon } > starting zsh? Or only after doing some completions? Or only af= ter } > the periodic function starts firing? } = } Immediately after starting and then every $PERIOD seconds. } = } Here's my current .zshrc: } = } PERIOD=3D1800 } periodic () { . $HOME/.zlogout } } = } Here's my .zlogout: } = } echo "In .zprofile 1" } #dirs >! $HOME/.zdirhistory } #echo -n =1B]1\;$USERNAME@$HOST=07=1B]2\;$USERNAME@$HOST $$=07 } = } You see the lines it had before commented out. It turns out that ANY } command in the file triggers _one_ alloc_stackp message. Turns out that "source" or "." inside any shell function will trigger that BUG warning, which isn't really a bug at all -- it's doshfunc() calling loop() recursively, so the allocation stack depth reflects the depth of recursion. zagzig<3> echo echo foo > foo zagzig<4> blat() { . foo } zagzig<5> blat foo BUG: alloc_stackp !=3D 0 in loop() zagzig<6> The for(;;) in loop() continues before reaching the DPUTS() call on any blank or commented line, which is why I didn't see it when I first tried to reproduce it, and which is why you see it once for each command. Try this patch. *** Src/init.c.orig Fri Jul 5 10:57:45 1996 --- Src/init.c Sun Jul 7 09:07:57 1996 *************** *** 128,134 **** if (toplevel) noexitct =3D 0; } ! DPUTS(alloc_stackp, "BUG: alloc_stackp !=3D 0 in loop()"); if (ferror(stderr)) { zerr("write error", NULL, 0); clearerr(stderr); --- 128,134 ---- if (toplevel) noexitct =3D 0; } ! DPUTS(alloc_stackp > locallevel, "BUG: alloc_stackp > locallevel in lo= op()"); if (ferror(stderr)) { zerr("write error", NULL, 0); clearerr(stderr); -- = Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lante= rn New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday= "