Skip to content

Conversation

@vapier
Copy link
Contributor

@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.
@vapier
Copy link
Contributor Author

vapier commented Nov 5, 2025

is there anything else needed before merging ? kind of sucks missing another wasi-sdk release.

Copy link
Collaborator

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, this fell off the radar, we will update the 28 release to get this in. The release is still a draft.

@pchickey pchickey merged commit d181bdd into WebAssembly:main Nov 5, 2025
alexcrichton added a commit to alexcrichton/wasi-sdk that referenced this pull request Nov 5, 2025
@vapier
Copy link
Contributor Author

vapier commented Nov 5, 2025

thx bud

alexcrichton added a commit to WebAssembly/wasi-sdk that referenced this pull request Nov 5, 2025
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