Skip to content

Conversation

vapier
Copy link

@vapier vapier commented Oct 1, 2025

OpenSSH allocates a pollfd structure for all of its channels, but doesn't request events for all of them all the time. If it wants to check a subset, it clears events, but keeps nfds at the max. This causes the wasip1 implementation to incorrectly abort as it assumes that if POLLRDNORM & POLLWRNORM didn't match, it must be due to requesting unsupported events, and then it errors out with ENOSYS. Simply ignore the case where no events are requested and it all works fine.

OpenSSH allocates a pollfd structure for all of its channels, but
doesn't request events for all of them all the time.  If it wants
to check a subset, it clears events, but keeps nfds at the max.
This causes the wasip1 implementation to incorrectly abort as it
assumes that if POLLRDNORM & POLLWRNORM didn't match, it must be
due to requesting unsupported events, and then it errors out with
ENOSYS.  Simply ignore the case where no events are requested and
it all works fine.
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.

2 participants