[php-src] Issue #9829: Bug in refactoring in PHP 8.1.6 Windows shmat() function
| From: | TysonAndre | Date: | Tue, 25 Oct 2022 23:00:38 +0000 |
| Subject: | [php-src] Issue #9829: Bug in refactoring in PHP 8.1.6 Windows shmat() function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242683@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9829
Author: TysonAndre
### Description
The following code:
See https://github.com/krakjoe/apcu/issues/445 for
the original report
and https://github.com/php/php-src/pull/8648
- The shmat function will now return something other than -1 if the address wasn't allocated,
due to checking an offset of a pointer against null instead of checking the original pointer. That
seems likely to be the bug affecting windows users of APCu when certain web servers are used on
Windows (I'm not familiar with windows APIs)
Resulted in this output:
(apcu (in-memory shared cache) suddenly sharing memory between different php processes in php 8.1.6
But I expected this output instead:
apcu behavior remains the same as php 8.1.5
### PHP Version
8.1.6+
### Operating System
Windows