Skip to content
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

Fix FD getting code on big endian #17259

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

Conversation

NattyNarwhal
Copy link
Member

stream casting as FD returns a php_socket_t, which is an int, but zend_long is 64-bit (on those platforms). This works on LE by accidental (unless it forgets to clear the high word), but is fatal on big endian.

fb2443a in master seems to have made this obvious, but the issue exists in earlier versions too. Fixes a regression introduced by that commit on big endian. (see GH-17258 for CI there)

@NattyNarwhal NattyNarwhal marked this pull request as ready for review December 24, 2024 21:01
stream casting as FD returns a php_socket_t, which is an int, but
zend_long is 64-bit (on those platforms). This works on LE by
accidental (unless it forgets to clear the high word), but is fatal
on big endian.
ext/posix/posix.c Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants