zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Weird bug with approximate completion
Date: Wed, 03 Mar 1999 15:54:58 +0100	[thread overview]
Message-ID: <9903031454.AA22503@ibmth.df.unipi.it> (raw)

I'm getting a weird bug with approximate completion:  the shell exits with
an out-of-memory error.  One command that did this (there were more) was
% echo ~/bin/comp/set<TAB>
where the real file is ~/bin/comp/_setopt.

It looks like zhalloc() is being called with one argument and getting
another much larger one.  It could be specific to AIX 3.2, and related to
the fact that my stack backtrace is now 97 frames deep (but another time it
was `only' 88).  No fewer then 12 of those (10 in the other case) are
runshfunc(), because of the effect of wrappers.  The limits are all large,
e.g. stacksize is 32MB.  Maybe it would be nice to flatten out the
hierarchy for calls to shell functions a bit.

But it's strange it only happens when correcting, so I can't be sure it
isn't a shell problem.  I couldn't get it to happen as such on HPUX or
IRIX, but I did see something weird with correction on IRIX, lots of 255
characters appeared (which isn't even German).  So maybe there is some
corruption coming from the shell.  Looks rather subtle though.  In that
case it may be useful to know that the call to zhalloc() that goes wrong is
always from

		p = (char *)ncalloc(lpl + lsl + 3);

in make complistflags() around line 6192.  The arguments lpl and lsl
themselves seem to be sensible, so it's nothing simple.  One clue might be
that I don't use pattern matching much apart from correction, and this is
in a (ispattern & 1) section (fairly innocuous looking, however, and
ordinary glob completion doesn't seem to do this).

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


             reply	other threads:[~1999-03-03 15:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03 14:54 Peter Stephenson [this message]
1999-03-03 16:19 Sven Wischnowsky
1999-03-04  9:35 ` Peter Stephenson
1999-03-04 10:18 Sven Wischnowsky

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=9903031454.AA22503@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --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).