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

From: Date: Fri, 30 Oct 2026 09:54:16 +0000
Subject: [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142993@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-10-30T10:54:00+01:00 Commit: https://github.com/php/php-src/commit/7dc666cf4f3b7e790a0bb3948b7fac2400f6eb21 Raw diff: https://github.com/php/php-src/commit/7dc666cf4f3b7e790a0bb3948b7fac2400f6eb21.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: 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 e1e63f21b0ad..73e7d4c3c422 100644 --- a/NEWS +++ b/NEWS @@ -109,6 +109,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 build with OpenSSL 4.1. (Weilin Du) diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index a513627414ac..aa8826e69f16 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -102,7 +102,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 (#142993) next »