felipe Sun, 08 Aug 2010 23:56:29 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302011
Log: - Fixed bug #50481 (Storing many SPLFixedArray in an array crashes) Bug: http://bugs.php.net/50481 (Feedback) Storing many SPLFixedArray in an array crashes Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/spl/spl_fixedarray.c U php/php-src/trunk/ext/spl/spl_fixedarray.c Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2010-08-08 22:43:14 UTC (rev 302010) +++ php/php-src/branches/PHP_5_3/NEWS 2010-08-08 23:56:29 UTC (rev 302011) @@ -16,6 +16,7 @@ - Fixed bug #51610 (Using oci_connect causes PHP to take a long time to exit). Requires Oracle bug fix 9891199 for this patch to have an effect. (Oracle Corp.) +- Fixed bug #50481 (Storing many SPLFixedArray in an array crashes). (Felipe) 22 Jul 2010, PHP 5.3.3 - Upgraded bundled sqlite to version 3.6.23.1. (Ilia) Modified: php/php-src/branches/PHP_5_3/ext/spl/spl_fixedarray.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/spl/spl_fixedarray.c 2010-08-08 22:43:14 UTC (rev 302010) +++ php/php-src/branches/PHP_5_3/ext/spl/spl_fixedarray.c 2010-08-08 23:56:29 UTC (rev 302011) @@ -158,6 +158,9 @@ zend_hash_index_update(intern->std.properties, i, (void *)&intern->array->elements[i], sizeof(zval *), NULL); Z_ADDREF_P(intern->array->elements[i]); } else { + if (GC_G(gc_active)) { + return NULL; + } zend_hash_index_update(intern->std.properties, i, (void *)&EG(uninitialized_zval_ptr), sizeof(zval *), NULL); Z_ADDREF_P(EG(uninitialized_zval_ptr)); } Modified: php/php-src/trunk/ext/spl/spl_fixedarray.c =================================================================== --- php/php-src/trunk/ext/spl/spl_fixedarray.c 2010-08-08 22:43:14 UTC (rev 302010) +++ php/php-src/trunk/ext/spl/spl_fixedarray.c 2010-08-08 23:56:29 UTC (rev 302011) @@ -159,6 +159,9 @@ zend_hash_index_update(ht, i, (void *)&intern->array->elements[i], sizeof(zval *), NULL); Z_ADDREF_P(intern->array->elements[i]); } else { + if (GC_G(gc_active)) { + return NULL; + } zend_hash_index_update(ht, i, (void *)&EG(uninitialized_zval_ptr), sizeof(zval *), NULL); Z_ADDREF_P(EG(uninitialized_zval_ptr)); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php