diff options
| author | Arnaud Le Blanc <lbarnaud@php.net> | 2008-09-14 15:20:16 +0000 |
|---|---|---|
| committer | Arnaud Le Blanc <lbarnaud@php.net> | 2008-09-14 15:20:16 +0000 |
| commit | 374723d056ceb71617141e202725c92ecb2ee724 (patch) | |
| tree | 8e711c8d280c1ad8006a61511f39d706735941d5 | |
| parent | c2f830ca21bcc94fd191eb9c6d2eeca3bb60c058 (diff) | |
| download | php-git-374723d056ceb71617141e202725c92ecb2ee724.tar.gz | |
MFB "Disabled $GLOBALS' refcount modification"
| -rw-r--r-- | Zend/zend_gc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 7892c6d027..8571cd7b66 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -302,7 +302,9 @@ static void zval_scan_black(zval *pz TSRMLS_DC) 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 void zval_mark_grey(zval *pz TSRMLS_DC) 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; } |
