Uh oh!
There was an error while loading. Please reload this page.
Properly handle shmget() ENOMEM error conditions on Windows - #9748
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Lewiscowles1986
commented
Sep 23, 2023
This looks like a really nice fix. Can I ask if there is any desire to get this merged? Looking into newer PHP build failures on Windows, it does seem that they could be influenced by seemingly small bugs like this fixes. |
krakjoe
commented
Aug 31, 2025
I'm unsure why no CI is running for this ? anyone ? It looks correct and perfectly reasonable to merge, but I'm reluctant without running tests. @cmb69 if you're around could you get this to run CI ? |
We need to properly handle `MapViewOfFileEx()` failures; otherwise strange error messages might be reported in the following. E.g. bug72858.phpt is likely to fail on 32bit Windows with "Warning: shm_attach(): Failed for key 0x64: File exists".
cmb69
commented
Aug 31, 2025
I have rebased onto current master, and now CI is running. Still not sure whether CI is really helpful here (as far as I know, we have only few tests regarding SHM on Windows). And I can barely remember what this PR is about. |
We need to properly handle
MapViewOfFileEx()failures; otherwise strange error messages might be reported in the following. E.g. bug72858.phpt is likely to fail on 32bit Windows with "Warning: shm_attach(): Failed for key 0x64: File exists".Note that this issue also affects older PHP versions, but the chance of
MapViewOfFileEx()failing is very small there, because we only tried to map an info segment there, instead of trying to map the whole segment now, due to #8648.