You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug in refactoring in PHP 8.2 Windows shmat() function #9829
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.2 and newer
Operating System
Windows
Suggested fix
(I don't have visual studio or Windows to test this with the bug report for apcu_fetch on PHP 8.1.6+ myself, so I don't know if it's already been fixed or can be reproduced by others yet)
Thanks for reporting! While you are right that this change was not correct, it was only applied to PHP-8.2, so is unlikely the cause of the APCu issue. Anyhow, I'll have a closer look at both.
changed the title [-]Bug in refactoring in PHP 8.1.6 Windows shmat() function[/-][+]Bug in refactoring in PHP 8.2 Windows shmat() function[/+]on Nov 1, 2022
Activity
cmb69 commentedon Oct 26, 2022
Thanks for reporting! While you are right that this change was not correct, it was only applied to PHP-8.2, so is unlikely the cause of the APCu issue. Anyhow, I'll have a closer look at both.
TysonAndre commentedon Oct 26, 2022
I'm not certain which version it started in, then, my original bug report was inaccurate.
[-]Bug in refactoring in PHP 8.1.6 Windows shmat() function[/-][+]Bug in refactoring in PHP 8.2 Windows shmat() function[/+]Fix phpGH-9829: Bug in refactoring Windows shmat() function
Merge branch 'PHP-8.2'
Fix phpGH-9829: Bug in refactoring Windows shmat() function