php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #64966
Patch bug64966.phpt revision 2013-06-08 09:19 UTC by laruence@php.net
Patch bug64966.patch revision 2013-06-08 09:19 UTC by laruence@php.net
Patch exception.diff revision 2013-06-07 19:53 UTC by bfrance@php.net

Patch exception.diff for Scripting Engine problem Bug #64966

Patch version 2013-06-07 19:53 UTC

Return to Bug #64966 | Download this patch
Patch Revisions:

Developer: bfrance@php.net

--- Zend/zend_vm_def.h.orig	2013-06-07 19:43:03.388289932 +0000
+++ Zend/zend_vm_def.h	2013-06-07 19:44:02.948273490 +0000
@@ -2301,6 +2301,7 @@
 	EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
 
 	if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
+		ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
 		if (EX(function_state).function->common.arg_info) {
 			zend_uint i=0;
 			zval **p = (zval**)EX(function_state).arguments;
@@ -2313,7 +2314,6 @@
 		}
 
 		if (EXPECTED(EG(exception) == NULL)) {
-			ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
 			EX_T(opline->result.u.var).var.ptr_ptr = &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;
 
--- Zend/zend_vm_execute.h.orig	2013-06-07 19:43:15.455668137 +0000
+++ Zend/zend_vm_execute.h	2013-06-07 19:43:51.723264859 +0000
@@ -301,6 +301,7 @@
 	EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
 
 	if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
+		ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
 		if (EX(function_state).function->common.arg_info) {
 			zend_uint i=0;
 			zval **p = (zval**)EX(function_state).arguments;
@@ -313,7 +314,6 @@
 		}
 
 		if (EXPECTED(EG(exception) == NULL)) {
-			ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
 			EX_T(opline->result.u.var).var.ptr_ptr = &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;
 
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 14:01:50 2014 UTC