From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6384 invoked by alias); 4 Dec 2010 23:26:33 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28472 Received: (qmail 5663 invoked from network); 4 Dec 2010 23:26:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.43 as permitted sender) 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= MIME-Version: 1.0 Date: Sun, 5 Dec 2010 00:26:27 +0100 Message-ID: Subject: Segfault in completion inside a [[]] From: emotn To: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 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.