Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Test failure with negative substring offsets



On Mon, 23 May 2011 16:56:14 +0100
Peter Stephenson <Peter.Stephenson@xxxxxxx> 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  invo‐
       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.

-- 
Peter Stephenson <pws@xxxxxxx>            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, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author