zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: parser (was: Re: PATCH: Improved _mailboxes)
Date: Wed, 23 Feb 2000 18:58:28 +0000	[thread overview]
Message-ID: <E12Ngvd-0003g1-00.2000-02-23-18-54-29@cmailg7.svr.pol.co.uk> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Wed, 23 Feb 2000 14:21:44 +0100." <200002231321.OAA00470@beta.informatik.hu-berlin.de>

This will probably be my last email for a while...

Sven Wischnowsky wrote:
> Here is the first of the two. As I said, this mainly makes the parser
> create wordcode directly, no more extra compilation phase.

I'm getting a core dump in zfinit from my .zshrc (after both patches, in
fact).  It's in text.c.  Actually, there seem to be two bugs there.  One
happens when a function is empty and you run `which' or equivalent:
getpermtext() calls gettext2() without realising that the prog.len is zero,
so it's only going to find garbage.  This must be because the code for
end-of-text is not being added, or if it was removed it's not being tested
enough.

I can't offhand see what's causing the second, but this seems to tickle it
on my system (although I only tried this after masking out the previous one
by putting an if (prog.len) before the call to gettext2()):

  chpwd() {
    if [[ ${+ZFTP_USER} = 1 && -n $ZFTP_USER ]]; then
      zftp_chpwd
    else
      [[ -t 1 && -t 2 ]] && header -P "%m:  %~";
    fi
  }
  which chpwd

causes a crash with a backtrace as follows, although it's probably more
useful to know that it seems to go wrong at the start of the second `[['.

#0  0x808d07f in taddstr (s=0x1e97c27d <Address 0x1e97c27d out of bounds>)
    at text.c:60
#1  0x808d154 in taddlist (state=0x7fffe000, num=3721) at text.c:81
#2  0x808d746 in gettext2 (state=0x7fffe000) at text.c:368
#3  0x808d246 in getpermtext (prog=0x80cd968, c=0x1) at text.c:126
#4  0x80667f8 in printshfuncnode (hn=0x80cd8e8, printflags=16)
    at hashtable.c:882
#5  0x80551aa in bin_whence (nam=0x2aac07d8 "which", argv=0x7ffff080, 
    ops=0x7ffff0d0 "", func=0) at builtin.c:2346
#6  0x8051bbd in execbuiltin (args=0x2aac07b8, bn=0x809d898) at builtin.c:367
#7  0x805df93 in execcmd (state=0x7ffff354, input=0, output=0, how=18, last1=2)
    at exec.c:2235
#8  0x805b9ef in execpline2 (state=0x7ffff354, pcode=579, how=18, input=0, 
    output=0, last1=0) at exec.c:1172
#9  0x805b235 in execpline (state=0x7ffff354, slcode=4098, how=18, last1=0)
    at exec.c:965
#10 0x805ad98 in execlist (state=0x7ffff354, dont_change_job=0, exiting=0)
    at exec.c:812
#11 0x805ab7a in execode (p=0x7fffe000, dont_change_job=0, exiting=135061469)
    at exec.c:721
#12 0x806a744 in loop (toplevel=1, justonce=0) at init.c:144
#13 0x80512ee in main (argc=2, argv=0x7ffff3f4) at ./main.c:86

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>


  parent reply	other threads:[~2000-02-23 18:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-23 13:21 Sven Wischnowsky
2000-02-23 16:45 ` Bart Schaefer
2000-02-23 18:58 ` Peter Stephenson [this message]
2000-02-24  7:47 ` Andrej Borsenkow
2000-02-24  8:54 Sven Wischnowsky
2000-02-24  9:07 Sven Wischnowsky
2000-02-24 18:08 ` Bart Schaefer
2000-02-24 10:03 Sven Wischnowsky
2000-02-25  8:41 Sven Wischnowsky
2000-02-25  9:55 ` Andrej Borsenkow

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=E12Ngvd-0003g1-00.2000-02-23-18-54-29@cmailg7.svr.pol.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --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).