summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-07-29 18:06:42 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-07-29 18:44:08 +0200
commitd95c53834cec1570b8f3e836cd514d6ae5901e68 (patch)
tree78b33f1453bdd2fb6d6298387a8039445b3e7dfb
parent57ad5b34325db883726ec96c0683c7c1bd874cc4 (diff)
downloadphp-git-d95c53834cec1570b8f3e836cd514d6ae5901e68.tar.gz
Amendment to OPcache base file removal
We fix the erroneous segment size. We also keep the segment pointer at the allocated address, but increase the position instead.
-rw-r--r--ext/opcache/shared_alloc_win32.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 26bf0539ea..badc2ec488 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -311,11 +311,10 @@ static int create_segments(size_t requested_size, zend_shared_segment ***shared_
} else {
((void**)mapping_base)[0] = mapping_base;
((void**)mapping_base)[1] = (void*)execute_ex;
- ((char*)shared_segment->p) += ACCEL_BASE_POINTER_SIZE;
}
- shared_segment->pos = 0;
- shared_segment->size = requested_size;
+ shared_segment->pos = ACCEL_BASE_POINTER_SIZE;
+ shared_segment->size = requested_size - ACCEL_BASE_POINTER_SIZE;
zend_shared_alloc_unlock_win32();