From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20161 invoked from network); 21 Oct 1999 15:32:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Oct 1999 15:32:30 -0000 Received: (qmail 5186 invoked by alias); 21 Oct 1999 15:32:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8362 Received: (qmail 5178 invoked from network); 21 Oct 1999 15:32:22 -0000 Message-Id: <199910211531.KAA17425@wo1203.cmg.FCNBD.COM> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 4.2mach v148) X-Nextstep-Mailer: Mail 4.2mach (Enhance 2.0b5) From: Brian Boonstra Date: Thu, 21 Oct 99 10:31:41 -0500 To: zsh-workers@sunsite.auc.dk Subject: BUG: doinsert() in NextStep/OpenStep 4.2 Hi folks I just did a compile of the bart7 patchlevel on an OpenStep/Intel version 4.2 machine. Building on OpenStep requires specifying a different compiler than the ancient gcc they give you, so I used % CC=/bin/cc ./configure edited the linker commands in the makefile, and then ran Src/zsh. I typed "ls", got a listing, and then zsh hung. I investigated this bug, and to the best of my limited ability, here is a characterization: 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. I (c)ontinued, then went to the bart7 window, and typed the single letter "l". This is what I got from gdb: (gdb) c Reading in symbols for zle_misc.c...done. Program generated(1): Memory access exception on address 0x0 (protection failure). 0x8b63f in doinsert (str=0xbfffeea8 "l") at zle_misc.c:54 54 line[cs++] = *s == Meta ? *++s ^ 32 : *s; I then set a breakpoint so I could get a better idea of what is going on, and here is what I saw: (gdb) att 17401 Dynamic Linkeditor at 0x12000000 offset 0x0 Executable at 0x2000 offset 0x0 /NextLibrary/Frameworks/System.framework/Versions/A/System at 0x5000000 offset 0x0 0x507a4c8 in _read () (gdb) b zle_misc.c:54 (gdb) c 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 line Reading in symbols for lex.c...done. $1 = (unsigned char *) 0xd0f94 "L" (gdb) p s $2 = 0xbfffeea8 "l" (gdb) p len $3 = 1 (gdb) p Meta No symbol "Meta" in current context. (gdb) p c1 $4 = 108 (gdb) p m $5 = 0 (gdb) p cs No symbol "cs" in current context. (gdb) History of zsh version 3 on OpenStep 4.2 (as I know it) 3.0.x does not compile 3.1.x compiles only after some patches, but has completion bugs bart7 compiles with almost no trouble (some compiler and linker problems) but sees this bug That's all I know to do for now. Does anyone have further advice on debugging this? I'm a decent programmer, but no expert on shells or zsh. - Brian