zsh-workers
 help / color / mirror / code / Atom feed
From: Brian Boonstra <boonstb@cmg.FCNBD.COM>
To: zsh-workers@sunsite.auc.dk
Subject: BUG: doinsert() in NextStep/OpenStep 4.2
Date: Thu, 21 Oct 99 10:31:41 -0500	[thread overview]
Message-ID: <199910211531.KAA17425@wo1203.cmg.FCNBD.COM> (raw)

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


             reply	other threads:[~1999-10-21 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-21 15:31 Brian Boonstra [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199910211531.KAA17425@wo1203.cmg.FCNBD.COM \
    --to=boonstb@cmg.fcnbd.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).