[php-src] master: Merge branch 'PHP-8.6'

From: Date: Mon, 16 Nov 2026 14:38:49 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143737@lists.php.net to get a copy of this message
Author: Arnaud Le Blanc (arnaud-lb) Date: 2026-11-16T15:38:06+01:00 Commit: https://github.com/php/php-src/commit/465bbedddaef27bff700bc68b01a9d59c0536323 Raw diff: https://github.com/php/php-src/commit/465bbedddaef27bff700bc68b01a9d59c0536323.diff Merge branch 'PHP-8.6' * PHP-8.6: Fix opcache.enable_file_override lookups racing with OPcache restarts (#25483) Changed paths: M ext/opcache/zend_accelerator_module.c Diff: diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 5ff9fef9c807..805805e0684b 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -396,6 +396,12 @@ ZEND_INI_END() static bool filename_is_in_cache(zend_string *filename) { zend_string *key; + bool ret = 0; + + /* The hash may be cleaned by a restart: only look it up while holding the read lock */ + if (!ZCG(accelerator_enabled) || accelerator_shm_read_lock() != SUCCESS) { + return false; + } key = accel_make_persistent_key(filename); if (key != NULL) { @@ -403,19 +409,19 @@ static bool filename_is_in_cache(zend_string *filename) if (persistent_script && !persistent_script->corrupted) { if (ZCG(accel_directives).validate_timestamps) { zend_file_handle handle; - bool ret; zend_stream_init_filename_ex(&handle, filename); ret = validate_timestamp_and_record_ex(persistent_script, &handle) == SUCCESS; zend_destroy_file_handle(&handle); - return ret; + } else { + ret = true; } - - return true; } } - return false; + accelerator_shm_read_unlock(); + + return ret; } static bool filename_is_in_file_cache(zend_string *filename)

« previous php.cvs (#143737) next »