logo       

cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug3539: msg#00094

Subject: cvs: ZendEngine2(PHP_5_1) / zend_vm_def.h zend_vm_execute.h /tests bug35393.phpt php-src NEWS
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/NEWS?r1=1.2027.2.239&r2=1.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/ZendEngine2/zend_vm_def.h?r1=1.59.2.19&r2=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/ZendEngine2/zend_vm_execute.h?r1=1.62.2.19&r2=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(ZEND_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/ZendEngine2/tests/bug35393.phpt?r=1.1&p=1
Index: ZendEngine2/tests/bug35393.phpt
+++ ZendEngine2/tests/bug35393.phpt

-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe