Skip to content

Commit cbf9712

Browse files
committed
Add assertion that refcount is 1
1 parent db545b3 commit cbf9712

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8662,6 +8662,7 @@ ZEND_VM_HANDLER(183, ZEND_BIND_STATIC, CV, UNUSED, REF)
86628662
ht = zend_array_dup(EX(func)->op_array.static_variables);
86638663
ZEND_MAP_PTR_SET(EX(func)->op_array.static_variables_ptr, ht);
86648664
}
8665+
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
86658666

86668667
value = (zval*)((char*)ht->arData + (opline->extended_value & ~(ZEND_BIND_REF|ZEND_BIND_IMPLICIT)));
86678668

Zend/zend_vm_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47471,6 +47471,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_BIND_STATIC_SPEC_CV_UNUSED_HAN
4747147471
ht = zend_array_dup(EX(func)->op_array.static_variables);
4747247472
ZEND_MAP_PTR_SET(EX(func)->op_array.static_variables_ptr, ht);
4747347473
}
47474+
ZEND_ASSERT(GC_REFCOUNT(ht) == 1);
4747447475

4747547476
value = (zval*)((char*)ht->arData + (opline->extended_value & ~(ZEND_BIND_REF|ZEND_BIND_IMPLICIT)));
4747647477

0 commit comments

Comments
 (0)