]> granicus.if.org Git - php/commitdiff
Fixed a possible crash because of recursive GC invocation
authorDmitry Stogov <dmitry@php.net>
Mon, 17 May 2010 07:50:33 +0000 (07:50 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 17 May 2010 07:50:33 +0000 (07:50 +0000)
NEWS
ext/simplexml/simplexml.c

diff --git a/NEWS b/NEWS
index 0f0bf189b0fd06818ba2ba8f9594d655ac4a6ee9..9de7107d6180b33d6912806c35c5f2e200af399b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,7 @@ PHP                                                                        NEWS
 - Fixed very rare memory leak in mysqlnd, when binding thousands of columns.
   (Andrey)
 
+- Fixed a possible crash because of recursive GC invocation. (Dmitry)
 - Fixed a possible resource destruction issues in shm_put_var()
   Reported by Stefan Esser (Dmitry)
 - Fixed a possible information leak because of interruption of XOR operator.
index 5087b4f9dc0421a1da7c644ef2f80b9ec1d76fc6..12cedfce75a29b383bdfdc4d91c234d35a168371 100644 (file)
@@ -1083,6 +1083,9 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{
                zend_hash_clean(sxe->properties);
                rv = sxe->properties;
        } else {
+               if (GC_G(gc_active)) {
+                       return NULL;
+               }
                ALLOC_HASHTABLE(rv);
                zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0);
                sxe->properties = rv;