com php-src: Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken): NEWS ext/opcache/shared_alloc_win32.c
| From: | Dmitry Stogov | Date: | Thu, 24 Sep 2015 07:48:34 +0000 |
| Subject: | com php-src: Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken): NEWS ext/opcache/shared_alloc_win32.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89154@lists.php.net to get a copy of this message | ||
Commit: 262160e0e9919dce914df2f0643c4b16ca137454
Author: Dmitry Stogov <dmitry@zend.com> Thu, 24 Sep 2015 10:48:34 +0300
Parents: 92708e3e04eca49738c004c3f594aeab2c3c52f4
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=262160e0e9919dce914df2f0643c4b16ca137454
Log:
Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
Changed paths:
M NEWS
M ext/opcache/shared_alloc_win32.c
Diff:
diff --git a/NEWS b/NEWS
index 2d0b38c..41ef2ba 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,9 @@ PHP NEWS
. Fixed bug #70279 (HTTP Authorization Header is sometimes passed to newer
reqeusts). (Laruence)
+- Opcache
+ . Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
+
- OpenSSL
. Require at least OpenSSL version 0.9.8. (Jakub Zelenka)
. Fixed bug #68312 (Lookup for openssl.cnf causes a message box). (Anatol)
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 92cf086..141c95d 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -206,12 +206,17 @@ static int create_segments(size_t requested_size, zend_shared_segment
***shared_
/* Mapping failed, wait for mapping object to get freed and retry */
CloseHandle(memfile);
memfile = NULL;
+ if (++map_retries < MAX_MAP_RETRIES) {
+ break;
+ }
+ zend_shared_alloc_unlock_win32();
Sleep(1000 * (map_retries + 1));
+ zend_shared_alloc_lock_win32();
} else {
zend_shared_alloc_unlock_win32();
return ret;
}
- } while (++map_retries < MAX_MAP_RETRIES);
+ } while (1);
if (map_retries == MAX_MAP_RETRIES) {
zend_shared_alloc_unlock_win32();