com php-src: Merge branch 'PHP-7.0': ext/opcache/ZendAccelerator.c ext/opcache/zend_file_cache.c ext/opcache/zend_persis t_calc.c

From: Date: Wed, 24 Feb 2016 18:16:35 +0000
Subject: com php-src: Merge branch 'PHP-7.0': ext/opcache/ZendAccelerator.c ext/opcache/zend_file_cache.c ext/opcache/zend_persis t_calc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91155@lists.php.net to get a copy of this message
Commit: 1a46917740d97501566f1896e279596b2dde9282 Author: Dmitry Stogov <dmitry@zend.com> Wed, 24 Feb 2016 21:16:35 +0300 Parents: 55c0de8f95d7496268245e7e26ccdef278649042 43366f8ba82a68e74ccb568951ae809533d6d672 Branches: master Link: http://git.php.net/?p=php-src..git;a=commitdiff;h=1a46917740d97501566f1896e279596b2dde9282 Log: Merge branch 'PHP-7.0' * PHP-7.0: Fixed more synchronisation issues during SHM reload Changed paths: MM ext/opcache/ZendAccelerator.c MM ext/opcache/zend_file_cache.c MM ext/opcache/zend_persist_calc.c Diff: diff --cc ext/opcache/ZendAccelerator.c index 3907bee,cd91dfb..5f1c84b --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@@ -1563,10 -1571,12 +1571,12 @@@ zend_op_array *file_cache_compile_file( } } + SHM_UNPROTECT(); persistent_script = zend_file_cache_script_load(file_handle); + SHM_PROTECT(); if (persistent_script) { /* see bug #15471 (old BTS) */ - if (persistent_script->full_path) { + if (persistent_script->script.filename) { if (!EG(current_execute_data) || !EG(current_execute_data)->opline || !EG(current_execute_data)->func || !ZEND_USER_CODE(EG(current_execute_data)->func->common.type) || diff --cc ext/opcache/zend_file_cache.c index 40a19b9,b65abca..59950ae --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@@ -1399,8 -1356,9 +1398,9 @@@ use_process_mem if (cache_it) { script->dynamic_members.checksum = zend_accel_script_checksum(script); + script->dynamic_members.last_used = ZCG(request_time); - zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(script->full_path), ZSTR_LEN(script->full_path), 0, script); + zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(script->script.filename), ZSTR_LEN(script->script.filename), 0, script); zend_shared_alloc_unlock(); zend_arena_release(&CG(arena), checkpoint); diff --cc ext/opcache/zend_persist_calc.c index 9516c4e,25ba69b..22e74d6 --- a/ext/opcache/zend_persist_calc.c +++ b/ext/opcache/zend_persist_calc.c @@@ -405,8 -393,11 +408,11 @@@ uint zend_accel_script_persist_calc(zen ADD_DUP_SIZE(new_persistent_script, sizeof(zend_persistent_script)); if (key) { ADD_DUP_SIZE(key, key_length + 1); + } else { + /* script is not going to be saved in SHM */ + new_persistent_script->corrupted = 1; } - ADD_STRING(new_persistent_script->full_path); + ADD_STRING(new_persistent_script->script.filename); #ifdef __SSE2__ /* Align size to 64-byte boundary */

« previous php.cvs (#91155) next »