[php-src] Issue #8079: Recent patch to SplFixedArray causes array_walk + json encode to hang, circular var_export during gc to run out of memory
| From: | TysonAndre | Date: | Mon, 14 Feb 2022 17:39:17 +0000 |
| Subject: | [php-src] Issue #8079: Recent patch to SplFixedArray causes array_walk + json encode to hang, circular var_export during gc to run out of memory | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239779@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8079
Comment Author: TysonAndre
> If it recreates properties table on each call to
>
get_properties() let it protects from recursion itself.
SplFixedArray doesn't have a way to tell if the properties table (whether from
get_properties/get_properties_for) is still in use, though, so I don't know how you'd make
it protect from recursion without changing the engine (with var_export/debug_zval_dump, infinite
recursion detection only works if the returned table is the same instance every time)
What solution did you have in mind?
-----
Also, if a solution can't be found, I think we should revert
52ae6417ca3e62eff796bf3e3b5662fe6a9ee085 Fixed GH-8044 (var_export/debug_zval_dump
HT_ASSERT_RC1 debug failure for SplFixedArray) in 8.0+ to avoid introducing new bugs in
8.0/8.1 such as out of memory errors during gc (before the next RC/patch releases) - I consider the
original bug much, much less severe