[php-src] Issue #9266: GC root buffer keeps growing when destructors are present

From: Date: Sun, 07 Aug 2022 18:36:09 +0000
Subject: [php-src] Issue #9266: GC root buffer keeps growing when destructors are present
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242146@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9266 Author: olsavmic ### Description When should_rerun_gc in zend_gc_collect_cycles is set to true and the rerun_gc block is run for a second time, the count variable is reset, causing the gc_adjust_threshold potentially increase the size of root buffer indefinitely. This is particularly dangerous in combination with the fact that GC does not look at the memory usage, keeping very old objects in memory. This behaviour is causing huge leaks that were fixable by calling gc_collect_cycles manually (see the stable line after calling gc_collect_cycles) ![Screenshot 2022-08-03 at 09 04 41](https://user-images.githubusercontent.com/3778875/183305665-7a704626-84a9-47d2-b48a-e11a547f09be.png) Related to https://github.com/php/php-src/issues/9239 ### PHP Version PHP 8.1.9 ### Operating System Debian 10

« previous php.bugs (#242146) next »