com php-src: Fixed referenced value separation: Zend/zend_vm _def.h Zend/zend_vm_execute.h

From: Date: Tue, 19 Aug 2014 20:00:59 +0000
Subject: com php-src: Fixed referenced value separation: Zend/zend_vm _def.h Zend/zend_vm_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-80618@lists.php.net to get a copy of this message
Commit: 14439b79b474317f4c5c90bbca551ec3a1a5c505 Author: Dmitry Stogov <dmitry@zend.com> Wed, 20 Aug 2014 00:00:59 +0400 Parents: f07b41b465a5bb314a2d3b2bf309828e2dd7e299 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=14439b79b474317f4c5c90bbca551ec3a1a5c505 Log: Fixed referenced value separation Changed paths: M Zend/zend_vm_def.h M Zend/zend_vm_execute.h Diff: diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 7749197..34e317c 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def..h @@ -4547,7 +4547,10 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY) ZVAL_UNREF(array_ref); array_ptr = array_ref; } - if (Z_IMMUTABLE_P(array_ptr)) { + if (Z_IMMUTABLE_P(array_ptr) || + (Z_ISREF_P(array_ref) && + Z_REFCOUNTED_P(array_ptr) && + Z_REFCOUNT_P(array_ptr) > 1)) { zval_copy_ctor(array_ptr); } Z_ADDREF_P(array_ref); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index c2e59c1..ad879ed 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -3161,7 +3161,10 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A ZVAL_UNREF(array_ref); array_ptr = array_ref; } - if (Z_IMMUTABLE_P(array_ptr)) { + if (Z_IMMUTABLE_P(array_ptr) || + (Z_ISREF_P(array_ref) && + Z_REFCOUNTED_P(array_ptr) && + Z_REFCOUNT_P(array_ptr) > 1)) { zval_copy_ctor(array_ptr); } Z_ADDREF_P(array_ref); @@ -8678,7 +8681,10 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG ZVAL_UNREF(array_ref); array_ptr = array_ref; } - if (Z_IMMUTABLE_P(array_ptr)) { + if (Z_IMMUTABLE_P(array_ptr) || + (Z_ISREF_P(array_ref) && + Z_REFCOUNTED_P(array_ptr) && + Z_REFCOUNT_P(array_ptr) > 1)) { zval_copy_ctor(array_ptr); } Z_ADDREF_P(array_ref); @@ -14118,7 +14124,10 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG ZVAL_UNREF(array_ref); array_ptr = array_ref; } - if (Z_IMMUTABLE_P(array_ptr)) { + if (Z_IMMUTABLE_P(array_ptr) || + (Z_ISREF_P(array_ref) && + Z_REFCOUNTED_P(array_ptr) && + Z_REFCOUNT_P(array_ptr) > 1)) { zval_copy_ctor(array_ptr); } Z_ADDREF_P(array_ref); @@ -31476,7 +31485,10 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS ZVAL_UNREF(array_ref); array_ptr = array_ref; } - if (Z_IMMUTABLE_P(array_ptr)) { + if (Z_IMMUTABLE_P(array_ptr) || + (Z_ISREF_P(array_ref) && + Z_REFCOUNTED_P(array_ptr) && + Z_REFCOUNT_P(array_ptr) > 1)) { zval_copy_ctor(array_ptr); } Z_ADDREF_P(array_ref);

« previous php.cvs (#80618) next »