[php-src] PR #12086: Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
| From: | nielsdos | Date: | Wed, 30 Aug 2023 20:29:07 +0000 |
| Subject: | [php-src] PR #12086: Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23530@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/12086
Author: nielsdos
When you do an assignment between two zvals (no, not zval*), you copy all fields. This includes the
additional u2 data. So that means for example the Z_NEXT index gets copied, which in some cases can
therefore cause a cycle in zend_hash lookups.
Instead of doing an assignment, we should be doing a ZVAL_COPY (or ZVAL_COPY_VALUE for
non-refcounting cases). This avoids copying u2.