Re: backtrace
| From: | Sascha Schumann | Date: | Thu, 31 Aug 2000 18:22:22 +0000 |
| Subject: | Re: backtrace | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31479@lists.php.net to get a copy of this message | ||
On Thu, 31 Aug 2000, Zeev Suraski wrote:
> At 18:33 31-08-00, Sascha Schumann wrote:
> >On Thu, 31 Aug 2000, Stanislav Malyshev wrote:
> >
> > > j>> called with a null list of var_args, which is causing it to barf.
> > > j>> Problem is, the variable orig_args is being cleared on line 369
> > > j>> (va_end()), and
> > > j>> then being reused on line 444.
> > >
> > > Sorry, don't see any va_end in current CVS.
> >
> > The old_args stuff was removed some weeks ago (if we are
> > talking about main/main.c). The author of the original code
> > did not seem to be aware of the correct va_args use.
>
> Actually, the original version was quite alright, except for under very
> weird platforms, which define va_list as a type that cannot be copied
> (probably some sort of an array).
It was not necessary at all to copy it. That is where I saw
the basic misunderstanding. A va_list can be traversed
multiple times without copying it.
And if there would have been any need to copy it, the macro
va_copy should have been used.
But admittedly, while fixing the standard compliance, I broke
some other odd configurations :(
- Sascha