From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11314 invoked by alias); 23 May 2011 16:08:11 -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: 29354 Received: (qmail 19849 invoked from network); 23 May 2011 16:08:09 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 23 May 2011 17:08:02 +0100 From: Peter Stephenson To: "Zsh Hackers' List" Subject: Re: Test failure with negative substring offsets Message-ID: <20110523170802.3afb56fb@pwslap01u.europe.root.pri> In-Reply-To: <20110523165614.5e638a17@pwslap01u.europe.root.pri> References: <20110523161035.747f484d@pwslap01u.europe.root.pri> <20110523165614.5e638a17@pwslap01u.europe.root.pri> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.103.11.49] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.71.0.139 On Mon, 23 May 2011 16:56:14 +0100 Peter Stephenson wrote: > The second part is paranoia... the stdarg manual says the va_list ap > is undefined after return from a function, so it's safest to run > va_end() on it within the function where it's been used. gag... but it also says Each invocation of va_start() must be matched by a corresponding in= vo=E2=80=90 cation of va_end() in the same function. so we're caught between the devil and the deep blue sea. (I believe the "devil" was the wide outermost seam on a ship, which took a long time to put tar into, hence "having the devil to pay", which is also appropriate to zsh releases.) The implication might be that ap might point to any argument but the va_end()could be doing weird things with the current function context. I'll leave this one out since no one's ever seen a problem. --=20 Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, = UK Member of the CSR plc group of companies. CSR plc registered in England and= Wales, registered number 4187346, registered office Churchill House, Cambr= idge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom