Skip to content

Properly handle shmget() ENOMEM error conditions on Windows #9748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: PHP-8.2
Choose a base branch
from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 14, 2022

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.

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".
@Lewiscowles1986
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants