Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
BUG: doinsert() in NextStep/OpenStep 4.2
- X-seq: zsh-workers 8362
- From: Brian Boonstra <boonstb@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: BUG: doinsert() in NextStep/OpenStep 4.2
- Date: Thu, 21 Oct 99 10:31:41 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author