Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c
| From: | Thies C. Arntzen | Date: | Tue, 05 Aug 2003 09:16:03 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute_API.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-1607@lists.php.net to get a copy of this message | ||
On Mon, Aug 04, 2003 at 11:02:53AM -0000, Stanislav Malyshev wrote:
> stas Mon Aug 4 07:02:53 2003 EDT
>
> Modified files:
> /ZendEngine2 zend_execute_API.c
> Log:
> fix crash #24842
>
>
> Index: ZendEngine2/zend_execute_API.c
> diff -u ZendEngine2/zend_execute_API.c:1.221 ZendEngine2/zend_execute_API.c:1.222
> --- ZendEngine2/zend_execute_API.c:1.221 Sun Aug 3 13:40:44 2003
> +++ ZendEngine2/zend_execute_API.c Mon Aug 4 07:02:53 2003
> @@ -17,7 +17,7 @@
> +----------------------------------------------------------------------+
> */
>
> -/* $Id: zend_execute_API.c,v 1.221 2003/08/03 17:40:44 zeev Exp $ */
> +/* $Id: zend_execute_API.c,v 1.222 2003/08/04 11:02:53 stas Exp $ */
>
> #include <stdio.h>
> #include <signal.h>
> @@ -189,8 +189,7 @@
> void shutdown_executor(TSRMLS_D)
> {
> zend_try {
> - zend_ptr_stack_destroy(&EG(arg_types_stack));
> -
> + zend_ptr_stack_clean(&EG(arg_types_stack), do_nothing, 1);
> /* Removed because this can not be safely done, e.g. in this situation:
> Object 1 creates object 2
> Object 3 holds reference to object 2.
> @@ -286,6 +285,7 @@
>
> zend_hash_destroy(&EG(included_files));
>
> + zend_ptr_stack_destroy(&EG(arg_types_stack));
> zend_ptr_stack_destroy(&EG(user_error_handlers));
> zend_ptr_stack_destroy(&EG(user_exception_handlers));
> zend_objects_store_destroy(&EG(objects_store));
>
this will have an impact on destructors if a script exits
thru an exit() call inside any function, right? the real
solution would be to make sure arg_types_stack is always
empty before shutdown_executor is called...
tc