Skip to content

Commit 262160e

Browse files
committed
Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
1 parent 92708e3 commit 262160e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ PHP NEWS
2424
. Fixed bug #70279 (HTTP Authorization Header is sometimes passed to newer
2525
reqeusts). (Laruence)
2626

27+
- Opcache
28+
. Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken)
29+
2730
- OpenSSL
2831
. Require at least OpenSSL version 0.9.8. (Jakub Zelenka)
2932
. Fixed bug #68312 (Lookup for openssl.cnf causes a message box). (Anatol)

ext/opcache/shared_alloc_win32.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,17 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
206206
/* Mapping failed, wait for mapping object to get freed and retry */
207207
CloseHandle(memfile);
208208
memfile = NULL;
209+
if (++map_retries < MAX_MAP_RETRIES) {
210+
break;
211+
}
212+
zend_shared_alloc_unlock_win32();
209213
Sleep(1000 * (map_retries + 1));
214+
zend_shared_alloc_lock_win32();
210215
} else {
211216
zend_shared_alloc_unlock_win32();
212217
return ret;
213218
}
214-
} while (++map_retries < MAX_MAP_RETRIES);
219+
} while (1);
215220

216221
if (map_retries == MAX_MAP_RETRIES) {
217222
zend_shared_alloc_unlock_win32();

0 commit comments

Comments
 (0)