[php-src] PR #25835: sapi/phpdbg: Fix btree cleanup skipping out-of-line branches
| From: | iliaal | Date: | Fri, 27 Nov 2026 13:08:00 +0000 |
| Subject: | [php-src] PR #25835: sapi/phpdbg: Fix btree cleanup skipping out-of-line branches | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41114@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25835
Author: iliaal
When a phpdbg watchpoint tree still holds entries at shutdown,
phpdbg_btree_clean_recursive() never steps to the next node of a contiguously allocated
chain and only looks at the first node's sibling. Branches hanging off deeper nodes leak, and
for keys that differ in the top bit the first node's sibling is freed once per remaining level.
There is no test: on a normal exit the trees are already empty, and the double free needs keys that
differ in bit 63, which no x86-64 user-space pointer does.