diff options
-rw-r--r-- | Zend/tests/bug78335_2.phpt | 12 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 5 |
2 files changed, 12 insertions, 5 deletions
diff --git a/Zend/tests/bug78335_2.phpt b/Zend/tests/bug78335_2.phpt new file mode 100644 index 0000000000..bc9e8f5f0c --- /dev/null +++ b/Zend/tests/bug78335_2.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #78335: Static properties containing cycles report as leak (internal class variant) +--FILE-- +<?php + +$foo = [&$foo]; +_ZendTestClass::$_StaticProp = $foo; + +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 11819cf327..4551085675 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -292,9 +292,6 @@ void shutdown_executor(void) /* {{{ */ } ZEND_HASH_FOREACH_END(); ZEND_HASH_REVERSE_FOREACH_VAL(EG(class_table), zv) { zend_class_entry *ce = Z_PTR_P(zv); - if (ce->type == ZEND_INTERNAL_CLASS) { - break; - } if (ce->default_static_members_count) { zend_cleanup_internal_class_data(ce); } @@ -395,8 +392,6 @@ void shutdown_executor(void) /* {{{ */ } ZEND_HASH_FOREACH_END_DEL(); } - zend_cleanup_internal_classes(); - while (EG(symtable_cache_ptr) > EG(symtable_cache)) { EG(symtable_cache_ptr)--; zend_hash_destroy(*EG(symtable_cache_ptr)); |