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 @@ -1537,11 +1537,11 @@ ZEND_API int zend_gc_collect_cycles(void)
1537
1537
}
1538
1538
}
1539
1539
1540
- /* Destroy zvals */
1540
+ /* Destroy zvals. The root buffer may be reallocated. */
1541
1541
GC_TRACE ("Destroying zvals" );
1542
- current = GC_IDX2PTR ( GC_FIRST_ROOT ) ;
1543
- last = GC_IDX2PTR ( GC_G ( first_unused ));
1544
- while ( current != last ) {
1542
+ idx = GC_FIRST_ROOT ;
1543
+ while ( idx != end ) {
1544
+ current = GC_IDX2PTR ( idx );
1545
1545
if (GC_IS_GARBAGE (current -> ref )) {
1546
1546
p = GC_GET_PTR (current -> ref );
1547
1547
GC_TRACE_REF (p , "destroying" );
@@ -1572,11 +1572,12 @@ ZEND_API int zend_gc_collect_cycles(void)
1572
1572
zend_hash_destroy (arr );
1573
1573
}
1574
1574
}
1575
- current ++ ;
1575
+ idx ++ ;
1576
1576
}
1577
1577
1578
1578
/* Free objects */
1579
1579
current = GC_IDX2PTR (GC_FIRST_ROOT );
1580
+ last = GC_IDX2PTR (end );
1580
1581
while (current != last ) {
1581
1582
if (GC_IS_GARBAGE (current -> ref )) {
1582
1583
p = GC_GET_PTR (current -> ref );
You can’t perform that action at this time.
0 commit comments