cvs: ZendEngine2 / zend_gc.c

[email protected] ("Arnaud Le Blanc")
Newsgroups php.zend-engine.cvs
Message-ID <cvslbarnaud1221405616@cvsserver>
lbarnaud		Sun Sep 14 15:20:16 2008 UTC

  Modified files:              
    /ZendEngine2	zend_gc.c 
  Log:
  MFB "Disabled $GLOBALS' refcount modification"
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.c?r1=1.17&r2=1.18&diff_format=u
Index: ZendEngine2/zend_gc.c
diff -u ZendEngine2/zend_gc.c:1.17 ZendEngine2/zend_gc.c:1.18
--- ZendEngine2/zend_gc.c:1.17	Sun Aug 24 16:45:50 2008
+++ ZendEngine2/zend_gc.c	Sun Sep 14 15:20:16 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_gc.c,v 1.17 2008/08/24 16:45:50 helly Exp $ */
+/* $Id: zend_gc.c,v 1.18 2008/09/14 15:20:16 lbarnaud Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -302,7 +302,9 @@
 
 static int children_scan_black(zval **pz TSRMLS_DC)
 {
-	(*pz)->refcount__gc++;
+	if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) {
+		(*pz)->refcount__gc++;
+	}
 
 	if (GC_ZVAL_GET_COLOR(*pz) != GC_BLACK) {
 		zval_scan_black(*pz TSRMLS_CC);
@@ -346,7 +348,9 @@
 
 static int children_mark_grey(zval **pz TSRMLS_DC)
 {
-	(*pz)->refcount__gc--;
+	if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) {
+		(*pz)->refcount__gc--;
+	}
 	zval_mark_grey(*pz TSRMLS_CC);
 	return 0;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.