[php-src] PR #20468: Prevent late calls to zend_add_system_entropy()

From: Date: Thu, 13 Nov 2025 10:41:46 +0000
Subject: [php-src] PR #20468: Prevent late calls to zend_add_system_entropy()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34040@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20468 Author: arnaud-lb Calling zend_add_system_entropy() after zend_finalize_system_id() has no effect. The function returns FAILURE in that case, but it's not checked in practice, so some zend_add_system_entropy() calls are unknowingly no-ops. Here I change zend_add_system_entropy() so that calling it too late triggers an assertion failure. I also fix JIT initialization, which called zend_add_system_entropy() too late. Extensions using zend_get_resource_handle(), zend_get_op_array_extension_handle(), zend_get_internal_function_extension_handle(), or calling zend_add_system_entropy() explicitly, should do so in MINIT() (for PHP modules) or in the startup hook (for Zend extensions).

« previous php.git-pulls (#34040) next »