mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
This commit is contained in:
commit
df93506f56
2 changed files with 9 additions and 6 deletions
|
@ -158,12 +158,17 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_put(zend_object *object)
|
|||
|
||||
ZEND_API void ZEND_FASTCALL zend_objects_store_del(zend_object *object) /* {{{ */
|
||||
{
|
||||
ZEND_ASSERT(GC_REFCOUNT(object) == 0);
|
||||
|
||||
/* GC might have released this object already. */
|
||||
if (UNEXPECTED(GC_TYPE(object) == IS_NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make sure we hold a reference count during the destructor call
|
||||
otherwise, when the destructor ends the storage might be freed
|
||||
when the refcount reaches 0 a second time
|
||||
*/
|
||||
ZEND_ASSERT(GC_REFCOUNT(object) == 0);
|
||||
|
||||
if (!(OBJ_FLAGS(object) & IS_OBJ_DESTRUCTOR_CALLED)) {
|
||||
GC_ADD_FLAGS(object, IS_OBJ_DESTRUCTOR_CALLED);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue