[php-src] PR #23845: ext/pdo: Report bound params/columns to GC and fix driver_params refcount
| From: | iliaal | Date: | Tue, 22 Sep 2026 14:24:09 +0000 |
| Subject: | [php-src] PR #23845: ext/pdo: Report bound params/columns to GC and fix driver_params refcount | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38717@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23845
Author: iliaal
PDOStatement's get_gc handler never walked bound_params or bound_columns, so a reference cycle
through a bindParam() or bindColumn() argument stayed invisible to the collector.
register_bound_param() has also copied driver_params since 5b8d0dc6ae0 while
really_register_bound_param() added a reference of its own, leaving one zval with two references, so
even a reported cycle could not be reclaimed. The test binds six objects with driver-option
arguments and expects all six collected after gc_collect_cycles().