com php-src: always resolve symlinks when revalidate_path=O n: ext/opcache/ZendAccelerator.c

From: Date: Wed, 18 Dec 2013 15:49:12 +0000
Subject: com php-src: always resolve symlinks when revalidate_path=O n: ext/opcache/ZendAccelerator.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76623@lists.php.net to get a copy of this message
Commit: f78a44e353cf11395cb68eb3e5ca87877ac6c67b Author: Antony Dovgal <tony2001@php.net> Wed, 18 Dec 2013 19:49:12 +0400 Parents: 15efda9b01d9e3fa15adb65b323984f94e334dde Branches: badoo-5.5_mysqlnd Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f78a44e353cf11395cb68eb3e5ca87877ac6c67b Log: always resolve symlinks when revalidate_path=On Changed paths: M ext/opcache/ZendAccelerator.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index b6b6ec1..8bff763 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -1153,8 +1153,9 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr zend_persistent_script *existing_persistent_script = (zend_persistent_script *)bucket->data; if (!existing_persistent_script->corrupted) { - if (!ZCG(accel_directives).validate_timestamps || - (new_persistent_script->timestamp == existing_persistent_script->timestamp)) { + if (!ZCG(accel_directives).revalidate_path && + (!ZCG(accel_directives).validate_timestamps || + (new_persistent_script->timestamp == existing_persistent_script->timestamp))) { zend_accel_add_key(key, key_length, bucket TSRMLS_CC); } zend_shared_alloc_unlock(TSRMLS_C); @@ -1195,7 +1196,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr /* store script structure in the hash table */ bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->full_path, new_persistent_script->full_path_len + 1, 0, new_persistent_script); - if (bucket && + if (bucket && !ZCG(accel_directives).revalidate_path && /* key may contain non-persistent PHAR aliases (see issues #115 and #149) */ memcmp(key, "phar://", sizeof("phar://") - 1) != 0 && (new_persistent_script->full_path_len != key_length ||

« previous php.cvs (#76623) next »