From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17117 invoked from network); 7 Jul 2001 23:17:24 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jul 2001 23:17:24 -0000 Received: (qmail 9563 invoked by alias); 7 Jul 2001 23:16:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15306 Received: (qmail 9550 invoked from network); 7 Jul 2001 23:16:19 -0000 From: "Bart Schaefer" Message-Id: <1010707231600.ZM16868@candle.brasslantern.com> Date: Sat, 7 Jul 2001 23:15:59 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: 4.0.1 (and 4.1.0) infinite loop with history MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I accidentally pasted some diff output into a shell window and it was executed as a command. Zsh went into an infinite loop. The loop actually appears to be the `for (;;)' in fclist(), builtin.c line 1452, but ^C-ing it always stops in zhalloc(). I can reproduce this starting from scratch with `zsh -f' -- all you need to do is fill up the history (so that event number 1 will fall off the saved lines) and then give the command `r = 1'. The complete stack is: #0 zhalloc (size=24) at ../../zsh-4.0/Src/mem.c:303 #1 0x8054fd0 in fcsubs (sp=0xbffff31c, sub=0x0) at ../../zsh-4.0/Src/builtin.c:1398 #2 0x8055179 in fclist (f=0x80e0800, n=0, r=0, D=0, d=0, first=5, last=5, subs=0x4011e298, pprog=0x0) at ../../zsh-4.0/Src/builtin.c:1457 #3 0x8054b94 in bin_fc (nam=0x4011e268 "r", argv=0xbffff4b0, ops=0xbffff510 "", func=16) at ../../zsh-4.0/Src/builtin.c:1324 #4 0x8051731 in execbuiltin (args=0x4011e238, bn=0x80c05a8) at ../../zsh-4.0/Src/builtin.c:367 #5 0x806527e in execcmd (state=0xbffff7c8, input=0, output=0, how=18, last1=2) at ../../zsh-4.0/Src/exec.c:2287 #6 0x8061fd7 in execpline2 (state=0xbffff7c8, pcode=451, how=18, input=0, output=0, last1=0) at ../../zsh-4.0/Src/exec.c:1192 #7 0x806154f in execpline (state=0xbffff7c8, slcode=5122, how=18, last1=0) at ../../zsh-4.0/Src/exec.c:982 #8 0x8060ee9 in execlist (state=0xbffff7c8, dont_change_job=0, exiting=0) at ../../zsh-4.0/Src/exec.c:826 #9 0x8060c03 in execode (p=0x4011e1e0, dont_change_job=0, exiting=0) at ../../zsh-4.0/Src/exec.c:729 #10 0x80761e1 in loop (toplevel=1, justonce=0) at ../../zsh-4.0/Src/init.c:160 #11 0x8078800 in zsh_main (argc=2, argv=0xbffff85c) at ../../zsh-4.0/Src/init.c:1209 #12 0x8050df4 in main (argc=2, argv=0xbffff85c) at ../../zsh-4.0/Src/main.c:37 -- 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