Commit: 23a9bb09baa504f20929c150b184b6c032cfc251 Author: Dmitry Stogov <dmi...@zend.com> Mon, 10 Jun 2013 11:43:03 +0400 Parents: 540488bf55746a36363c56462e939a56550e3717 Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=23a9bb09baa504f20929c150b184b6c032cfc251 Log: Avoid multiple allocations of the same key in different processes Changed paths: M ext/opcache/ZendAccelerator.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 212e1e6..922fc91 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2583,7 +2583,9 @@ static int accel_startup(zend_extension *extension) ZCG(include_path_key) = NULL; if (ZCG(include_path) && *ZCG(include_path)) { ZCG(include_path_len) = strlen(ZCG(include_path)); - if (!zend_accel_hash_is_full(&ZCSG(include_paths))) { + ZCG(include_path_key) = zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_path_len) + 1); + if (!ZCG(include_path_key) && + !zend_accel_hash_is_full(&ZCSG(include_paths))) { char *key; zend_shared_alloc_lock(TSRMLS_C); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php