Skip to content

Commit 9af705e

Browse files
committed
Merge branch 'PHP-7.4'
2 parents ccf7954 + 7bd2b9d commit 9af705e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Zend/zend_gc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,6 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
829829
while (zv != end) {
830830
if (Z_REFCOUNTED_P(zv)) {
831831
ref = Z_COUNTED_P(zv);
832-
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
833832
GC_DELREF(ref);
834833
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
835834
GC_REF_SET_COLOR(ref, GC_GREY);
@@ -840,7 +839,6 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
840839
}
841840
if (EXPECTED(!ht)) {
842841
ref = Z_COUNTED_P(zv);
843-
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
844842
GC_DELREF(ref);
845843
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
846844
GC_REF_SET_COLOR(ref, GC_GREY);
@@ -861,7 +859,6 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
861859
} else if (GC_TYPE(ref) == IS_REFERENCE) {
862860
if (Z_REFCOUNTED(((zend_reference*)ref)->val)) {
863861
ref = Z_COUNTED(((zend_reference*)ref)->val);
864-
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
865862
GC_DELREF(ref);
866863
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
867864
GC_REF_SET_COLOR(ref, GC_GREY);
@@ -894,7 +891,6 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
894891
}
895892
if (Z_REFCOUNTED_P(zv)) {
896893
ref = Z_COUNTED_P(zv);
897-
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
898894
GC_DELREF(ref);
899895
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
900896
GC_REF_SET_COLOR(ref, GC_GREY);
@@ -908,7 +904,6 @@ static void gc_mark_grey(zend_refcounted *ref, gc_stack *stack)
908904
zv = Z_INDIRECT_P(zv);
909905
}
910906
ref = Z_COUNTED_P(zv);
911-
ZEND_ASSERT(GC_REFCOUNT(ref) > 0);
912907
GC_DELREF(ref);
913908
if (!GC_REF_CHECK_COLOR(ref, GC_GREY)) {
914909
GC_REF_SET_COLOR(ref, GC_GREY);

Zend/zend_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ static zend_always_inline uint32_t zend_gc_addref(zend_refcounted_h *p) {
10321032
}
10331033

10341034
static zend_always_inline uint32_t zend_gc_delref(zend_refcounted_h *p) {
1035+
ZEND_ASSERT(p->refcount > 0);
10351036
ZEND_RC_MOD_CHECK(p);
10361037
return --(p->refcount);
10371038
}

0 commit comments

Comments
 (0)