Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

From: Date: Wed, 21 Aug 2002 17:45:02 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c
References: 1  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-345@lists.php.net to get a copy of this message
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? 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


« previous php.zend-engine.cvs (#345) next »