[php-src] PR #25553: ext/pdo_pgsql: Collect nonpersistent notice callback cycles
| From: | iliaal | Date: | Wed, 18 Nov 2026 13:19:10 +0000 |
| Subject: | [php-src] PR #25553: ext/pdo_pgsql: Collect nonpersistent notice callback cycles | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40771@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25553
Author: iliaal
If a
Pdo\Pgsql::setNoticeCallback() callback captures its own connection, the cycle is
never collected and leaks until the end of the request, because pdo_pgsql has no get_gc handler.
Report the callback for nonpersistent handles. Persistent handles are skipped on purpose: every
wrapper of a shared handle would report the same single reference, and the collector would then free
a callback that is still set.