From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20964 invoked from network); 26 Sep 2006 18:12:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 Sep 2006 18:12:14 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 22559 invoked from network); 26 Sep 2006 18:12:08 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Sep 2006 18:12:08 -0000 Received: (qmail 24705 invoked by alias); 26 Sep 2006 18:12:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22773 Received: (qmail 24695 invoked from network); 26 Sep 2006 18:12:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 Sep 2006 18:12:04 -0000 Received: (qmail 22279 invoked from network); 26 Sep 2006 18:12:04 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 26 Sep 2006 18:12:02 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly15c.srv.mailcontrol.com (MailControl) with ESMTP id k8QIA8fe004468 for ; Tue, 26 Sep 2006 19:11:50 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Tue, 26 Sep 2006 19:10:19 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.7/8.13.4) with ESMTP id k8QIAJNq003192 for ; Tue, 26 Sep 2006 19:10:19 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.7/8.13.7/Submit) with ESMTP id k8QIAJ7a003189 for ; Tue, 26 Sep 2006 19:10:19 +0100 Message-Id: <200609261810.k8QIAJ7a003189@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: mb_metacharlenconv vs. tokens In-reply-to: <200609262203.41210.arvidjaar@newmail.ru> References: <200609252146.00249.arvidjaar@newmail.ru> <200609260920.k8Q9K4wb026573@news01.csr.com> <200609262203.41210.arvidjaar@newmail.ru> Comments: In-reply-to Andrey Borzenkov message dated "Tue, 26 Sep 2006 22:03:37 +0400." Date: Tue, 26 Sep 2006 19:10:19 +0100 From: Peter Stephenson X-OriginalArrivalTime: 26 Sep 2006 18:10:19.0079 (UTC) FILETIME=[066D8570:01C6E197] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-04-02 (www.mailcontrol.com) on 10.67.0.125 Andrey Borzenkov wrote: > Then this is very basic bug, because as simple as running function from V01 > test results in: > > Breakpoint 2, mb_metacharlenconv ( > > s=0xb7c41951 "\215\210M\211\205\215\210f\211\231\212\210zmodload -d\211\231\2 > 16: > \204\207:\207 \205m\210 \207\214\211\216", wcp=0xbfd4ef88) > > which corresponds to the line in zmodunload: > > if [[ -z ${(M)${(f)"$(zmodload -d)"}:#*:* $m( *|)} ]] > > It should have been > > untokenized at some point in the sequence leading to the call, > > #2 0x080bd2a4 in paramsubst (l=0xbfd4f7ac, n=0xbfd4f7a0, str=0xbfd4f388, > qt=0, ssub=4) at /home/bor/src/zsh/Src/subst.c:1499 The problem is probably here (or around here... there's been some recursive jiggery pokery). We should untokenize a nested substitution before trying to do anything with it, and only tokenize it later if the effect of GLOB_SUBST is present. This is roughly where I saw the problem before. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php