[php-src] master: Merge branch 'PHP-8.4' of ../PHP-8.4 into PHP-8.5

From: Date: Fri, 09 Oct 2026 15:22:42 +0000
Subject: [php-src] master: Merge branch 'PHP-8.4' of ../PHP-8.4 into PHP-8.5
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142119@lists.php.net to get a copy of this message
Author: Levi Morrison (morrisonlevi) Date: 2026-10-09T09:20:25-06:00 Commit: https://github.com/php/php-src/commit/29fc38b714ba17added505cad4636b6aef27dd41 Raw diff: https://github.com/php/php-src/commit/29fc38b714ba17added505cad4636b6aef27dd41.diff Merge branch 'PHP-8.4' of ../PHP-8.4 into PHP-8.5 Changed paths: A ext/zend_test/tests/system_id_reinitialization.phpt M NEWS M Zend/zend_system_id.c M ext/zend_test/test.c Diff: diff --git a/NEWS b/NEWS index ab7a4aed1ac2..43e9ef3d9655 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,9 @@ PHP NEWS ?? ??? ????, PHP 8.5.13 - Core: + . Fixed bug GH-24184 (System ID not being reinitialized after an Apache + graceful restart, potentially causing incompatible OPcache file cache + entries to be reused). (Levi Morrison) . Fixed memory leak when an exception already contains the pending exception in its previous chain. (Edmond) . Fixed bug GH-23979 (Nullsafe operator must not flush delayed oplines of an diff --git a/Zend/zend_system_id.c b/Zend/zend_system_id.c index 2c3ebab0f480..34142d959710 100644 --- a/Zend/zend_system_id.c +++ b/Zend/zend_system_id.c @@ -43,6 +43,7 @@ ZEND_API zend_result zend_add_system_entropy(const char *module_name, const char void zend_startup_system_id(void) { + finalized = 0; PHP_MD5Init(&context); PHP_MD5Update(&context, PHP_VERSION, sizeof(PHP_VERSION)-1); PHP_MD5Update(&context, ZEND_EXTENSION_BUILD_ID, sizeof(ZEND_EXTENSION_BUILD_ID)-1); diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 0260d25cd40a..ff2c4da72ac9 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -39,6 +39,7 @@ #include "test_arginfo.h" #include "zend_call_stack.h" #include "zend_exceptions.h" +#include "zend_system_id.h" #include "zend_mm_custom_handlers.h" #include "ext/uri/php_uri.h" @@ -1357,6 +1358,7 @@ static ZEND_METHOD(_ZendTestMagicCallForward, __call) } PHP_INI_BEGIN() + PHP_INI_ENTRY("zend_test.register_system_entropy", "0", PHP_INI_SYSTEM, NULL) STD_PHP_INI_BOOLEAN("zend_test.replace_zend_execute_ex", "0", PHP_INI_SYSTEM, OnUpdateBool, replace_zend_execute_ex, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.register_passes", "0", PHP_INI_SYSTEM, OnUpdateBool, register_passes, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.print_stderr_mshutdown", "0", PHP_INI_SYSTEM, OnUpdateBool, print_stderr_mshutdown, zend_zend_test_globals, zend_test_globals) @@ -1556,6 +1558,10 @@ PHP_MINIT_FUNCTION(zend_test) // Loading via dl() not supported with the observer API if (type != MODULE_TEMPORARY) { REGISTER_INI_ENTRIES(); + if (INI_BOOL("zend_test.register_system_entropy") && + zend_add_system_entropy("zend_test", "test", ZEND_STRL("test entropy")) == FAILURE) { + php_error_docref(NULL, E_WARNING, "Failed to register system entropy"); + } } else { (void)ini_entries; } diff --git a/ext/zend_test/tests/system_id_reinitialization.phpt b/ext/zend_test/tests/system_id_reinitialization.phpt new file mode 100644 index 000000000000..5e80b567c621 --- /dev/null +++ b/ext/zend_test/tests/system_id_reinitialization.phpt @@ -0,0 +1,40 @@ +--TEST-- +System ID reinitialization accepts extension entropy after engine restart +--SKIPIF-- +<?php +if (!extension_loaded('zend_test')) die('skip zend_test extension required'); +?> +--INI-- +zend_test.register_system_entropy=1 +--PHPDBG-- +r +clean +r +clean +r +q +--FILE-- +<?php +echo "Done\n"; +?> +--EXPECTF-- +[Successful compilation of %s] +prompt> Done +[Script ended normally] +prompt> Cleaning Execution Environment +Classes %d +Functions %d +Constants %d +Includes 0 +[Script ended normally] +prompt> Done +[Script ended normally] +prompt> Cleaning Execution Environment +Classes %d +Functions %d +Constants %d +Includes 0 +[Script ended normally] +prompt> Done +[Script ended normally] +prompt>

« previous php.cvs (#142119) next »