[php-src] PR #25477: Add native stack limit check to print_r()
| From: | Volkopat | Date: | Mon, 16 Nov 2026 06:56:35 +0000 |
| Subject: | [php-src] PR #25477: Add native stack limit check to print_r() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40670@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25477
Author: Volkopat
zend_print_zval_r_to_buf() recursed with no stack limit check, so a deeply nested array or object
crashed print_r() (GH-24605). Check the stack limit on entry and throw the usual "Maximum call
stack size" Error, matching var_dump(), var_export() and serialize().
print_hash() now stops iterating once an exception is pending, and zend_print_zval_r() no longer
writes partial output when the dump was aborted.