Skip to content

Io\Poll\Context::wait() prevent integer overflow - #23468

Closed
marc-mabe wants to merge 1 commit into
php:masterfrom
marc-mabe:poll_max_events
Closed

Io\Poll\Context::wait() prevent integer overflow#23468
marc-mabe wants to merge 1 commit into
php:masterfrom
marc-mabe:poll_max_events

Conversation

@marc-mabe

@marc-mabe marc-mabe commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This prevents integer overflow in case of SIZEOF_INT < SIZEOF_ZEND_LONG

Comment thread ext/standard/tests/poll/poll_wait_error_max_events.phpt Outdated
@devnexen

devnexen commented Aug 26, 2026

Copy link
Copy Markdown
Member

Hi @marc-mabe ; overflow check is safe_emalloc job here, so it s basically all about getting a tailored error message ?Not sure it s worth it honestly. Other unwarranted changes I see as well as variables declarations, we moved away from iso 90 a while ago.

Comment thread ext/standard/io_poll.c Outdated
@marc-mabe
marc-mabe force-pushed the poll_max_events branch 2 times, most recently from 52901ae to ca8c209 Compare August 26, 2026 20:39
@marc-mabe marc-mabe changed the title Io\Poll\Context::wait() max events range check Io\Poll\Context::wait() prevent integer overflow Aug 26, 2026
Comment thread ext/standard/io_poll.c Outdated
@marc-mabe
marc-mabe force-pushed the poll_max_events branch 2 times, most recently from dd766cc to 317acb6 Compare August 27, 2026 04:18
Comment thread ext/standard/io_poll.c Outdated
Comment thread ext/standard/tests/poll/poll_ctx_wait_error_int64.phpt Outdated
@devnexen

Copy link
Copy Markdown
Member

once both nits are addressed, I would say it s lgtm

@marc-mabe

Copy link
Copy Markdown
Contributor Author

@devnexen changes are done as requested

@devnexen devnexen closed this in b3cbd55 Aug 27, 2026
@devnexen

Copy link
Copy Markdown
Member

Thanks !

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