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

From: Date: Fri, 30 Oct 2026 09:54:14 +0000
Subject: [php-src] master: Merge branch 'PHP-8.4' into PHP-8.5
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142991@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-10-30T10:53:40+01:00 Commit: https://github.com/php/php-src/commit/688a99a61db113f188993742cb4682f45cb3af68 Raw diff: https://github.com/php/php-src/commit/688a99a61db113f188993742cb4682f45cb3af68.diff Merge branch 'PHP-8.4' into PHP-8.5 * PHP-8.4: Fix opcache.interned_strings_buffer being 0 in threads started later (ZTS) Changed paths: M NEWS M ext/opcache/zend_accelerator_module.c Diff: diff --git a/NEWS b/NEWS index 94d7d581ac4f..ff2c6cb7c4d0 100644 --- a/NEWS +++ b/NEWS @@ -175,6 +175,8 @@ PHP NEWS (ndossche, khaledalam) . Fix preloaded functions JIT-compiled on load being overwritten after restart. (Pavel Gushcha) + . Fix opcache.interned_strings_buffer being 0 in threads started later (ZTS). + (Pavel Gushcha) - OpenSSL: . Fixed bug GH-24784 (openssl_pkcs7_read() and openssl_cms_read() overwrite diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 316db5bb7cbd..aee877f9a7af 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -105,7 +105,12 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption) static ZEND_INI_MH(OnUpdateInternedStringsBuffer) { - if (accel_startup_ok) { + /* Under ZTS, every thread started later re-applies the INI entries at + * ZEND_INI_STAGE_STARTUP to fill its own globals. Accepting that is safe: the + * value comes from the global INI directives, so it is the one OPcache was + * set up with. NTS does not have this problem: STARTUP handlers run before + * accel_startup_ok is set, and accel_shutdown() clears it again. */ + if (accel_startup_ok && stage != ZEND_INI_STAGE_STARTUP) { if (strcmp(sapi_module.name, "fpm-fcgi") == 0) { zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer cannot be changed when OPcache is already set up. Are you using php_admin_value[opcache.interned_strings_buffer] in an individual pool's configuration?\n"); } else {

« previous php.cvs (#142991) next »