From: Brian Boonstra <boonstb@cmg.FCNBD.COM>
To: "Bart Schaefer" <schaefer@candle.brasslantern.com>
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: BUG: doinsert() in NextStep/OpenStep 4.2
Date: Thu, 21 Oct 99 14:28:43 -0500 [thread overview]
Message-ID: <199910211928.OAA22771@wo1203.cmg.FCNBD.COM> (raw)
In-Reply-To: <991021175506.ZM14852@candle.brasslantern.com>
Bart wrote:
> 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.
Sorry if I was unclear. Perhaps the following snippet will be more
informative (I'm still trying to work out what is relevant). I attached
before any kind of hang, continued, then typed the letter "l", which from
previous experience gave a memory exception at line 54:
(gdb) att 22701
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) c
Breakpoint 1, doinsert (str=0xbfffeea8 "l") at zle_misc.c:54
54 line[cs++] = *s == Meta ? *++s ^ 32 : *s;
(gdb) p s
$4 = 0xbfffeea8 "l"
(gdb) p m
$5 = 0
(gdb) p zshcs
$6 = 0
(gdb) p line
$7 = (unsigned char *) 0xd0fbc "|"
(gdb) p *s
$8 = 108 'l'
(gdb) s
Program generated(1): Memory access exception on address 0x0 (protection failure).
0x8b517 in doinsert (str=0xbfffeea8 "l") at zle_misc.c:54
54 line[cs++] = *s == Meta ? *++s ^ 32 : *s;
I have to say that I can't see why this line is failing. Since zshcs==0,
and *s!=Meta, this should just be setting line[0]="l" with no problem. Is
there something unusual I misunderstand about attaching debuggers to shells?
Lacking xterm, I did not try to use your shell code
> xterm -title GDBterm -e sh -c 'exec xterm -e gdb --tty=`tty` '"$*"
especially because I don't think my gdb accepts a --tty argument.
> } 3.0.x does not compile
>
> Not even 3.0.7? What's the failure, again?
I hadn't tested 3.0.7 before, actually. I just took a look at it, and it
does compile, but gives a different kind of problem. Any command (even
"exit") ends up in the mini-editor until you Ctrl-C out of it, like this:
wo1203 % ls /Cache/zsh/zsh-3.0.7
>
>
wo1203 % exit /Cache/zsh/zsh-3.0.7
>
>
wo1203 % /Cache/zsh/zsh-3.0.7
It doesn't crash, though...and gdb given no indication of errors. For
grins, I tried the same breakpoint as for bart7, but (and this is kind of
interesting) I never hit it at all.
Incidentally, for this email, both builds were configured with
CC=/bin/cc ./configure --enable-zsh-debug --enable-zsh-mem-debug
--enable-zsh-mem-warning --enable-zsh-secure-free --enable-zsh-hash-debug
I'm ready to check out anything else about what's going on here -- just let
me know what to look at!
Best Regards,
Brian
next prev parent reply other threads:[~1999-10-22 6:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-21 15:31 Brian Boonstra
1999-10-21 17:55 ` Bart Schaefer
1999-10-21 19:28 ` Brian Boonstra [this message]
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=199910211928.OAA22771@wo1203.cmg.FCNBD.COM \
--to=boonstb@cmg.fcnbd.com \
--cc=schaefer@candle.brasslantern.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).