diff options
author | Xinchen Hui <laruence@php.net> | 2015-01-23 14:18:56 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-01-23 14:18:56 +0800 |
commit | 76f438e06fc61d32272a1f9877266c8d97d871ba (patch) | |
tree | ab630f04870a25511db4ef4613510298afda7624 | |
parent | 16732dedfe84d16fa7ae11eff945672dc0214c7b (diff) | |
download | php-git-76f438e06fc61d32272a1f9877266c8d97d871ba.tar.gz |
Fixed ASSERTION
-rw-r--r-- | Zend/zend_gc.c | 6 | ||||
-rw-r--r-- | Zend/zend_gc.h | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c index 966b615b60..ea8c06f2ce 100644 --- a/Zend/zend_gc.c +++ b/Zend/zend_gc.c @@ -137,11 +137,7 @@ ZEND_API void gc_init(void) ZEND_API void gc_possible_root(zend_refcounted *ref) { - if (GC_TYPE(ref) == IS_NULL) { - return; - } - - ZEND_ASSERT(GC_TYPE(ref) == IS_ARRAY || GC_TYPE(ref) == IS_OBJECT); + ZEND_ASSERT(CG(unclean_shutdown) || (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)) { diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h index 80425fc7ec..40c9db7565 100644 --- a/Zend/zend_gc.h +++ b/Zend/zend_gc.h @@ -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))) { + if (Z_COLLECTABLE_P(z) && UNEXPECTED(!Z_GC_INFO_P(z)) && EXPECTED(GC_TYPE(Z_COUNTED_P(z)) != IS_NULL)) { gc_possible_root(Z_COUNTED_P(z)); } } |