Skip to content

Commit 9d72984

Browse files
committed
* fix include file issue
1 parent 633c26f commit 9d72984

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Zend/zend_fibers.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,16 @@ static HashTable *zend_fiber_object_gc(zend_object *object, zval **table, int *n
14231423
symTable = zend_unfinished_execution_gc_ex(ex, ex->func && ZEND_USER_CODE(ex->func->type) ? ex->call : NULL, buf, false);
14241424
}
14251425
if (symTable) {
1426+
/*
1427+
* Skip if this is the same symbol_table as previous frame (include shares symbol_table)
1428+
* Include operators inherit the symbol_table,
1429+
* which causes the same zval to be registered twice in the garbage collector.
1430+
* This leads to a double ZVAL_DELREF attempt.
1431+
*/
1432+
if (lastSymTable && lastSymTable == symTable) {
1433+
continue;
1434+
}
1435+
14261436
if (lastSymTable) {
14271437
zval *val;
14281438
ZEND_HASH_FOREACH_VAL(lastSymTable, val) {

0 commit comments

Comments
 (0)