Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c
| From: | Thies C. Arntzen | Date: | Thu, 22 Aug 2002 09:07:45 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c | ||
| References: | 1 2 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-346@lists.php.net to get a copy of this message | ||
On Wed, Aug 21, 2002 at 08:45:02PM +0300, Andi Gutmans wrote:
> Thies,
>
> This patch doesn't look right. At least zend_execute() is supposed to
> return using RETURN_FROM_EXECUTE_LOOP() which restores the
> current_execute_data.
> You might have a point with the internal function though. Is this what
> caused you to look into it?
i made this patch to ZE1 some time ago. but you are right,
it's only needed for internal-function. will correct!
tc
>
> Andi
>
> At 01:58 PM 8/21/2002 +0000, Thies C. Arntzen wrote:
> >thies Wed Aug 21 09:58:21 2002 EDT
> >
> > Modified files:
> > /ZendEngine2 zend_execute.c
> > Log:
> > zend_execute: make sure that current_execute_data points to the right
> > thing
> > after coming back from recursion.
> >
> >
> >
> >
> >Index: ZendEngine2/zend_execute.c
> >diff -u ZendEngine2/zend_execute.c:1.361 ZendEngine2/zend_execute.c:1.362
> >--- ZendEngine2/zend_execute.c:1.361 Sat Aug 17 16:20:36 2002
> >+++ ZendEngine2/zend_execute.c Wed Aug 21 09:58:20 2002
> >@@ -2077,6 +2077,7 @@
> >
> >ALLOC_ZVAL(EX(Ts)[EX(opline)->result.u.var].var.ptr);
> >
> >INIT_ZVAL(*(EX(Ts)[EX(opline)->result.u.var].var.ptr));
> > ((zend_internal_function
> >*) EX(function_state).function)->handler(EX(opline)->extended_value,
> >EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object), return_value_used
> >TSRMLS_CC);
> >+ EG(current_execute_data) =
> >&execute_data;
> >
> >EX(Ts)[EX(opline)->result.u.var].var.ptr->is_ref = 0;
> >
> >EX(Ts)[EX(opline)->result.u.var].var.ptr->refcount = 1;
> > if (!return_value_used) {
> >@@ -2101,6 +2102,7 @@
> > EG(active_op_array) =
> >(zend_op_array *) EX(function_state).function;
> >
> >
> >zend_execute(EG(active_op_array) TSRMLS_CC);
> >+ EG(current_execute_data) =
> >&execute_data;
> >
> > if (return_value_used &&
> >!EX(Ts)[EX(opline)->result.u.var].var.ptr) {
> > if
> > (!EG(exception)) {
> >@@ -2732,6 +2734,7 @@
> > EX(object) = NULL;
> >
> > zend_execute(new_op_array
> >TSRMLS_CC);
> >+ EG(current_execute_data) =
> >&execute_data;
> >
> >
> >EX(function_state).function = saved_function;
> > EX(object) = saved_object;
> >
> >
> >
> >--
> >Zend Engine CVS Mailing List (http://cvs.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
--
Thies C. Arnzten - Looking for all sorts of freelance work - just ask..
Whishlist: http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ