From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21383 invoked from network); 21 Oct 1999 17:55:28 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Oct 1999 17:55:28 -0000 Received: (qmail 18750 invoked by alias); 21 Oct 1999 17:55:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8365 Received: (qmail 18741 invoked from network); 21 Oct 1999 17:55:18 -0000 From: "Bart Schaefer" Message-Id: <991021175506.ZM14852@candle.brasslantern.com> Date: Thu, 21 Oct 1999 17:55:06 +0000 In-Reply-To: <199910211531.KAA17425@wo1203.cmg.FCNBD.COM> Comments: In reply to Brian Boonstra "BUG: doinsert() in NextStep/OpenStep 4.2" (Oct 21, 10:31am) References: <199910211531.KAA17425@wo1203.cmg.FCNBD.COM> X-Mailer: Z-Mail (5.0.0 30July97) To: Brian Boonstra , zsh-workers@sunsite.auc.dk Subject: Re: BUG: doinsert() in NextStep/OpenStep 4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 21, 10:31am, Brian Boonstra wrote: } Subject: BUG: doinsert() in NextStep/OpenStep 4.2 } } I typed "ls", got a listing, and then zsh hung. } } First, I rebuilt with debugging symbols: } } % CC=/bin/cc ./configure --enable-zsh-debug } } then I ran zsh. } } In another window, I opened gdb, and attached. So did you attach after zsh was hung (as in your first example)? Or did you attach first and then try to get zsh to hang? And did it hang, or did you get a crash of some kind? I can't be sure from your gdb trace. BTW, here's an update of my "gdbterm" script / autoloaded function, which is specifically meant for running gdb on interactive programs like shells and editors: ------ #! /bin/sh xterm -title GDBterm -e sh -c 'exec xterm -e gdb --tty=`tty` '"$*" ------ } (gdb) p Meta } No symbol "Meta" in current context. } (gdb) p cs } No symbol "cs" in current context. "Meta" and "cs" are #define'd. "Meta" is always 0x83, but "cs" expands to "zshcs" everywhere except in the spot where "zshcs" is defined. This is a hack to get around some system libraries (curses?) that also define a symbol "cs". } Breakpoint 1, doinsert (str=0xbfffeea8 "l") at zle_misc.c:54 } 54 line[cs++] = *s == Meta ? *++s ^ 32 : *s; } (gdb) l } 49 spaceinline(m * len); } 50 else if(cs + m * len > ll) } 51 spaceinline(cs + m * len - ll); } 52 while(m--) } 53 for(s = str; *s; s++) } 54 line[cs++] = *s == Meta ? *++s ^ 32 : *s; } 55 if(neg) } 56 cs += zmult * len; } 57 } } 58 } (gdb) p s } $2 = 0xbfffeea8 "l" } (gdb) p m } $5 = 0 And if you continue from this point, what happens? Since m == 0 and s[1] == 0 it looks as if it should exit the loop. I guess we need to see the value of "zshcs" (aka "cs") to see if it is -1 or some other bad index into line[]. } 3.0.x does not compile Not even 3.0.7? What's the failure, again? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com