For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > November 2005 > cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug35393.phpt ph









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug35393.phpt ph
Dmitry Stogov

2005-11-28, 6:56 pm

dmitry Mon Nov 28 09:32:35 2005 EDT

Added files: (Branch: PHP_5_1)
/ZendEngine2/tests bug35393.phpt

Modified files:
/php-src NEWS
/ZendEngine2 zend_vm_def.h zend_vm_execute.h
Log:
Fixed bug #35393 (changing static protected members from outside the class, one more reference issue)


http://cvs.php.net/diff.php/php-src...2027.2.240&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.239 php-src/NEWS:1.2027.2.240
--- php-src/NEWS:1.2027.2.239 Mon Nov 28 06:37:40 2005
+++ php-src/NEWS Mon Nov 28 09:32:29 2005
@@ -5,6 +5,8 @@
- Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony)
- Fixed bug #35399 (Since fix of bug #35273 SOAP decoding of
soapenc:base64binary fails). (Dmitry)
+- Fixed bug #35393 (changing static protected members from outside the class,
+ one more reference issue). (Dmitry)
- Fixed bug #35381 (ssl library is not initialized properly). (Alan)

28 Nov 2005, PHP 5.1.1
http://cvs.php.net/diff.php/ZendEng...=1.59.2.20&ty=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.19 ZendEngine2/zend_vm_def.h:1.59.2.20
--- ZendEngine2/zend_vm_def.h:1.59.2.19 Mon Oct 31 14:25:10 2005
+++ ZendEngine2/zend_vm_def.h Mon Nov 28 09:32:32 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: zend_vm_def.h,v 1.59.2.19 2005/10/31 19:25:10 dmitry Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.20 2005/11/28 14:32:32 dmitry Exp $ */

/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2186,7 +2186,8 @@
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
- (PZVAL_IS_REF(varptr) || varptr->refcount == 1)) {
+ (PZVAL_IS_REF(varptr) ||
+ (varptr->refcount == 1 && (OP1_TYPE == IS_CV || free_op1.var)))) {
varptr->is_ref = 1;
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
http://cvs.php.net/diff.php/ZendEng...=1.62.2.20&ty=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.19 ZendEngine2/zend_vm_execute.h:1.62.2.20
--- ZendEngine2/zend_vm_execute.h:1.62.2.19 Mon Oct 31 14:25:11 2005
+++ ZendEngine2/zend_vm_execute.h Mon Nov 28 09:32:32 2005
@@ -7057,7 +7057,8 @@
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
- (PZVAL_IS_REF(varptr) || varptr->refcount == 1)) {
+ (PZVAL_IS_REF(varptr) ||
+ (varptr->refcount == 1 && (IS_VAR == IS_CV || free_op1.var)))) {
varptr->is_ref = 1;
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);
@@ -19139,7 +19140,7 @@
static int ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEN
D_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
-
+ zend_free_op free_op1;
zval *varptr;

if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
@@ -19154,7 +19155,8 @@
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
- (PZVAL_IS_REF(varptr) || varptr->refcount == 1)) {
+ (PZVAL_IS_REF(varptr) ||
+ (varptr->refcount == 1 && (IS_CV == IS_CV || free_op1.var)))) {
varptr->is_ref = 1;
varptr->refcount++;
zend_ptr_stack_push(&EG(argument_stack), varptr);

http://cvs.php.net/co.php/ZendEngin....phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug35393.phpt
+++ ZendEngine2/tests/bug35393.phpt
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com