zsh-workers
 help / color / mirror / code / Atom feed
* BUG: doinsert() in NextStep/OpenStep 4.2
@ 1999-10-21 15:31 Brian Boonstra
  1999-10-21 17:55 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Boonstra @ 1999-10-21 15:31 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-10-22  7:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-21 15:31 BUG: doinsert() in NextStep/OpenStep 4.2 Brian Boonstra
1999-10-21 17:55 ` Bart Schaefer
1999-10-21 19:28   ` Brian Boonstra
1999-10-21 21:12     ` Bart Schaefer
1999-10-21 22:06       ` Brian Boonstra

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).