com php-src: Amendment to OPcache base file removal: ext/opcache/shared_alloc_win32.c

From: Date: Wed, 29 Jul 2020 16:44:08 +0000
Subject: com php-src: Amendment to OPcache base file removal: ext/opcache/shared_alloc_win32.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-112448@lists.php.net to get a copy of this message
Commit: d95c53834cec1570b8f3e836cd514d6ae5901e68 Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 29 Jul 2020 18:06:42 +0200 Parents: 57ad5b34325db883726ec96c0683c7c1bd874cc4 Branches: PHP-7.3 PHP-7..4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d95c53834cec1570b8f3e836cd514d6ae5901e68 Log: 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. Changed paths: M ext/opcache/shared_alloc_win32.c Diff: 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();

« previous php.cvs (#112448) next »