Revert "Fixed ASSERTION"

This reverts commit 76f438e06f.
This commit is contained in:
Dmitry Stogov 2015-01-23 16:37:39 +03:00
parent 4369215b8f
commit f71e64e53a
2 changed files with 6 additions and 2 deletions

View File

@ -137,7 +137,11 @@ ZEND_API void gc_init(void)
ZEND_API void gc_possible_root(zend_refcounted *ref)
{
ZEND_ASSERT(CG(unclean_shutdown) || (GC_TYPE(ref) == IS_ARRAY || GC_TYPE(ref) == IS_OBJECT));
if (GC_TYPE(ref) == IS_NULL) {
return;
}
ZEND_ASSERT(GC_TYPE(ref) == IS_ARRAY || GC_TYPE(ref) == IS_OBJECT);
GC_BENCH_INC(zval_possible_root);
if (EXPECTED(GC_GET_COLOR(GC_INFO(ref)) == GC_BLACK)) {

View File

@ -141,7 +141,7 @@ END_EXTERN_C()
static zend_always_inline void gc_check_possible_root(zval *z)
{
ZVAL_DEREF(z);
if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z)) && EXPECTED(GC_TYPE(Z_COUNTED_P(z)) != IS_NULL)) {
if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z))) {
gc_possible_root(Z_COUNTED_P(z));
}
}