dmitry Tue Oct 2 08:47:25 2007 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
Fixed access to freed memory in tests/classes/__call_001.phpt
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.48.2.7&r2=1.59.2.29.2.48.2.8&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.7
ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.8
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.48.2.7 Tue Oct 2 08:26:49 2007
+++ ZendEngine2/zend_vm_def.h Tue Oct 2 08:47:22 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.7 2007/10/02 08:26:49 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.48.2.8 2007/10/02 08:47:22 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -1940,6 +1940,7 @@
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
INIT_ZVAL(*(EX_T(opline->result.u.var).var.ptr));
+ EX_T(opline->result.u.var).var.fcall_returned_reference =
EX(function_state).function->common.return_reference;
if (EX(function_state).function->common.arg_info) {
zend_uint i=0;
@@ -1972,8 +1973,6 @@
*/
if (!return_value_used) {
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
- } else {
- EX_T(opline->result.u.var).var.fcall_returned_reference
= EX(function_state).function->common.return_reference;
}
} else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
HashTable *function_symbol_table;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.49.2.6&r2=1.62.2.30.2.49.2.7&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.6
ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.7
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.49.2.6 Tue Oct 2 08:26:49 2007
+++ ZendEngine2/zend_vm_execute.h Tue Oct 2 08:47:22 2007
@@ -174,6 +174,7 @@
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
INIT_ZVAL(*(EX_T(opline->result.u.var).var.ptr));
+ EX_T(opline->result.u.var).var.fcall_returned_reference =
EX(function_state).function->common.return_reference;
if (EX(function_state).function->common.arg_info) {
zend_uint i=0;
@@ -206,8 +207,6 @@
*/
if (!return_value_used) {
zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
- } else {
- EX_T(opline->result.u.var).var.fcall_returned_reference
= EX(function_state).function->common.return_reference;
}
} else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
HashTable *function_symbol_table;
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|