From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14270 invoked from network); 29 Sep 2008 17:34:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Sep 2008 17:34:55 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 19310 invoked from network); 29 Sep 2008 17:34:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Sep 2008 17:34:44 -0000 Received: (qmail 5910 invoked by alias); 29 Sep 2008 17:34:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25772 Received: (qmail 5893 invoked from network); 29 Sep 2008 17:34:37 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Sep 2008 17:34:37 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 0F1BE8030847 for ; Mon, 29 Sep 2008 19:34:33 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly51d.srv.mailcontrol.com (MailControl) with ESMTP id m8THYWan019031 for ; Mon, 29 Sep 2008 18:34:32 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 29 Sep 2008 18:34:27 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m8THYR1w011730 for ; Mon, 29 Sep 2008 18:34:27 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m8THYRH2011726 for ; Mon, 29 Sep 2008 18:34:27 +0100 X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: crash completing after ~[] X-Mailer: MH-E 8.0.3; nmh 1.3; GNU Emacs 22.1.1 Date: Mon, 29 Sep 2008 18:34:27 +0100 Message-ID: <11725.1222709667@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 29 Sep 2008 17:34:27.0722 (UTC) FILETIME=[9F52FEA0:01C92259] X-Scanned-By: MailControl A-08-50-15 (www.mailcontrol.com) on 10.68.0.161 X-Virus-Scanned: ClamAV 0.92.1/8353/Mon Sep 29 11:57:09 2008 on bifrost X-Virus-Status: Clean I got the shell to crash when completing (actually an attempted expansion) after "echo ~[]". Apart from the suggestive command line, this is actually unrelated to dynamic named directories. The expansion not surprising doesn't succeed anyway, so I haven't worried too much (or at all) about what the shell code is doing that provokes this; it appears to be an invalid pattern in a search through an associative array, which is indeed not properly handled at this point. Index: Src/params.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/params.c,v retrieving revision 1.146 diff -u -r1.146 params.c --- Src/params.c 13 Sep 2008 08:19:19 -0000 1.146 +++ Src/params.c 29 Sep 2008 17:29:49 -0000 @@ -1302,6 +1302,8 @@ if (v->isarr) { if (ishash) { + if (!pprog) + return 1; scanprog = pprog; scanstr = s; if (keymatch) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070