[php-src] Issue #8079: Recent patch to SplFixedArray causes array_walk + json encode to hang
| From: | TysonAndre | Date: | Fri, 11 Feb 2022 14:24:48 +0000 |
| Subject: | [php-src] Issue #8079: Recent patch to SplFixedArray causes array_walk + json encode to hang | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239675@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8079
Comment Author: TysonAndre
> This didn't work in PHP-8.0 before the patch, because of assertion - Zend/zend_hash.c:987:
> _zend_hash_index_add_or_update_i: Assertion `(zend_gc_refcount(&(ht)->gc) == 1) ||
> ((ht)->u.flags & (1<<6))' failed
That was usually setting the value of the array field to itself, unless you're trying really
hard to deliberately do that, so the debug assertion error seemed less severe than infinite
recursion.
I wonder if there were optimizations to avoid building properties in some cases, e.g. when there
were no dynamic properties of VarDumper? I thought I saw some but am likely mistaken