Re: backtrace
| From: | Zeev Suraski | Date: | Thu, 31 Aug 2000 17:30:27 +0000 |
| Subject: | Re: backtrace | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31471@lists.php.net to get a copy of this message | ||
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). What happened is that this code undergone lots of changes, which eventually brought it to a situation where both the 'safety assignment':
args = orig_args;
and the va_end() call after the vprintf() function were redundant (but were still fine on most platforms, and whenever they compiled). When the 'args=orig_args;' statement was removed and the va_end() statement was kept, the code became wrong (crashy) on many platforms.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/