[php-src] PR #24044: Zend: Copy the va_list per callback in zend_llist_apply_with_arguments()
| From: | iliaal | Date: | Thu, 01 Oct 2026 11:10:52 +0000 |
| Subject: | [php-src] PR #24044: Zend: Copy the va_list per callback in zend_llist_apply_with_arguments() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39032@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24044
Author: iliaal
zend_llist_apply_with_arguments() handed one va_list to every callback, so after the first callback
consumed it with va_arg() the next one read past the arguments on ABIs where va_list is an array
type, such as x86-64 SysV. Its only in-tree caller is zend_extension_dispatch_message(), so when an
extension registers, the second already-loaded zend_extension with a message_handler gets a garbage
message and arg. Each callback now gets its own va_copy(); zend_hash_apply_with_arguments() already
avoids this by calling va_start() per element.