[php-src] Issue #11314: Memory op cache is not shared between processes in Windows build
| From: | KoudelkaB | Date: | Wed, 24 May 2023 16:16:21 +0000 |
| Subject: | [php-src] Issue #11314: Memory op cache is not shared between processes in Windows build | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244519@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11314
Author: KoudelkaB
### Description
Current implmentation of **zend_shared_alloc_reattach** from
php-src\ext\opcache\shared_alloc_win32.c requires **php8.dll** (which contains the checked function
**execute_ex**) to be loaded at the same address in all processes that want to share the op cache,
but the linker options for php8.dll default build is DYNAMICBASE i.e. the php8.dll is instructed to
load to arbitrary adress in each proces which results in not working op cache sharing!
The problem can be fixed by modifying the PHP8.dll everytime we download official PHP build by:
EDITBIN /DYNAMICBASE:NO php8.dll
in order to make the op cache sharing between processes to work!
(editbin is available from visual studio console)
Can you please change the default build or reimplement op change sharing between processes so that
it would be workling out of the box - without the need to modifying the PHP8.dll by editbin?
### PHP Version
PHP 8.2.6
### Operating System
Windows