[php-src] PR #24529: ext/pdo: Fix GC freeing callbacks of a shared persistent connection
| From: | iliaal | Date: | Thu, 22 Oct 2026 10:14:28 +0000 |
| Subject: | [php-src] PR #24529: ext/pdo: Fix GC freeing callbacks of a shared persistent connection | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39694@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24529
Author: iliaal
PDO reported shared driver callbacks to the GC once per PDO object despite owning only one
reference, so two live PDO objects sharing a persistent SQLite connection could free callbacks still
in use. Driver callbacks are now reported only when one object owns the connection; cycles through
them remain uncollected while it is shared. SQLite is the only bundled driver with this GC hook.
Found while testing #24041; verified with pdo_sqlite on PHP-8.4 debug NTS and under valgrind.