From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11426 invoked from network); 25 Jul 2003 10:10:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 25 Jul 2003 10:10:33 -0000 Received: (qmail 14067 invoked by alias); 25 Jul 2003 10:10:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18906 Received: (qmail 14058 invoked from network); 25 Jul 2003 10:10:28 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 25 Jul 2003 10:10:28 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 25 Jul 2003 10:10:28 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.cambridgesiliconradio.com (Content Technologies SMTPRS 4.3.10) with ESMTP id ; Fri, 25 Jul 2003 11:09:46 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 25 Jul 2003 11:09:01 +0100 To: Chris Spiegel cc: zsh-workers@sunsite.dk Subject: Re: Bug in zsh 4.0.7 In-reply-to: "Chris Spiegel"'s message of "Fri, 25 Jul 2003 02:48:31 PDT." <20030725094831.GA19360@midgard.spiegels> Date: Fri, 25 Jul 2003 11:10:24 +0100 Message-ID: <6476.1059127824@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 25 Jul 2003 10:09:01.0032 (UTC) FILETIME=[C500FE80:01C35294] Chris Spiegel wrote: > Hi, > There is a bug in Src/math.c of zsh 4.0.7, line 382. It is: > > yyval.u.l = zstrtol(++ptr, &ptr, lastbase = 16); > > The issue is that it's unspecified whether ++ptr or &ptr happens first. I don't think that matters. &ptr always refers to the same address in memory, whatever the value of ptr is. --- --- Value | Y | |Y+1| |---| |---| Address &ptr->| | &ptr->| | --- --- ptr has certainly been incremented by the time of the function call, so the function call can change its value without any problem. You're worrying about the case where we pass ptr as the second argument, which as you say is undefined. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************