Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in zsh 4.0.7
- X-seq: zsh-workers 18906
- From: Peter Stephenson <pws@xxxxxxx>
- To: Chris Spiegel <matrix@xxxxxxxxxx>
- Subject: Re: Bug in zsh 4.0.7
- Date: Fri, 25 Jul 2003 11:10:24 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: "Chris Spiegel"'s message of "Fri, 25 Jul 2003 02:48:31 PDT." <20030725094831.GA19360@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author