zsh-workers
 help / color / mirror / code / Atom feed
From: emotn <emotn2@gmail.com>
To: zsh-workers@zsh.org
Subject: Segfault in completion inside a [[]]
Date: Sun, 5 Dec 2010 00:26:27 +0100	[thread overview]
Message-ID: <AANLkTi=LF1RYTteBZb1JzVE4=wioNM_Bc-SQ-kw4CuBO@mail.gmail.com> (raw)

Hello,

zsh segfaults with the following testcase (also segfaults with fresh
built zsh, 4.3.10 and 4.2.7) in "zsh -f":
- type this line: if [[ -e / ]] { echo }
- put the cursor after the '/'
- press tab

The segfault doesn't happen if there is nothing between '{' and '}'.
If instead we add more arguments inside, zsh will eat up all the CPU.

The last faulty call (before libc) is in complist.c. It rightfully
tries to complete based on the fact it's in a "[[ ]]" but the
"clwords" variable wrongly points at what's inside the "{ }" (a.k.a
{"echo", "}", 0}).
Unfortunately, I don't know enough about zsh source for making it point right.


             reply	other threads:[~2010-12-04 23:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-04 23:26 emotn [this message]
2010-12-05  1:05 ` Bart Schaefer

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='AANLkTi=LF1RYTteBZb1JzVE4=wioNM_Bc-SQ-kw4CuBO@mail.gmail.com' \
    --to=emotn2@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).