Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Segfault in completion inside a [[]]
- X-seq: zsh-workers 28472
- From: emotn <emotn2@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Segfault in completion inside a [[]]
- Date: Sun, 5 Dec 2010 00:26:27 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=d6RlhZgB5ajUI6LgEvt8RzVKqrRgWGQD0qy22nUBSE8=; b=v9wT6EibUcZ6S9cQSlnvvjnfuKBcJhg4rrqfm/xGquCKSn+8H7VA4arSn7k/bq3p9X pHlQBkQa5B0Xm4wt8ZO1LLBUY6/s7vWBQ1vTzoxPsWJmvr3NpEkZ+alWlEz7OXShm08y Vl6H3aVMkXokFcImKZihhVzOcfGU3EmtTW1tE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mek4EsQ1g5d6CNSI9avVz8G1tt0p5RxGFSRHnNEwf1pZTSsBkFK0rWKN77L7jf5Mp5 bcqCKZIJDdDz3Y9EQ6rgGEXkXMnjEFV2blwzq2IBXPWnEnnatlsZ0aMoa3JDBSkNMUVT tQKyMzMzvWLJKM1cQ+iXwVPv1VBvkYB2VITCo=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author