File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1547,11 +1547,11 @@ ZEND_API int zend_gc_collect_cycles(void)
1547
1547
}
1548
1548
}
1549
1549
1550
- /* Destroy zvals */
1550
+ /* Destroy zvals. The root buffer may be reallocated. */
1551
1551
GC_TRACE ("Destroying zvals" );
1552
- current = GC_IDX2PTR ( GC_FIRST_ROOT ) ;
1553
- last = GC_IDX2PTR ( GC_G ( first_unused ));
1554
- while ( current != last ) {
1552
+ idx = GC_FIRST_ROOT ;
1553
+ while ( idx != end ) {
1554
+ current = GC_IDX2PTR ( idx );
1555
1555
if (GC_IS_GARBAGE (current -> ref )) {
1556
1556
p = GC_GET_PTR (current -> ref );
1557
1557
GC_TRACE_REF (p , "destroying" );
@@ -1582,11 +1582,12 @@ ZEND_API int zend_gc_collect_cycles(void)
1582
1582
zend_hash_destroy (arr );
1583
1583
}
1584
1584
}
1585
- current ++ ;
1585
+ idx ++ ;
1586
1586
}
1587
1587
1588
1588
/* Free objects */
1589
1589
current = GC_IDX2PTR (GC_FIRST_ROOT );
1590
+ last = GC_IDX2PTR (end );
1590
1591
while (current != last ) {
1591
1592
if (GC_IS_GARBAGE (current -> ref )) {
1592
1593
p = GC_GET_PTR (current -> ref );
You can’t perform that action at this time.
0 commit comments