[php-src] PR #25972: ext/standard: Finish hash fill before RETURN_OOM() in str_split()
| From: | iliaal | Date: | Mon, 30 Nov 2026 20:50:35 +0000 |
| Subject: | [php-src] PR #25972: ext/standard: Finish hash fill before RETURN_OOM() in str_split() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41282@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25972
Author: iliaal
When
str_split() hits the memory limit partway through, it returns via
RETURN_OOM() inside ZEND_HASH_FILL_PACKED() without calling
ZEND_HASH_FILL_FINISH(), so the result array's element count stays 0 and the
segment strings already written are never released by its destructor. Finish the fill before
returning, as explode() does. Introduced in d6373dfe150.