Skip to content

fix(windows): handle empty event sets without WSAPoll - #797

Closed
Tenkeren11 wants to merge 2 commits into
wavefnd:masterfrom
Tenkeren11:fix-windows-empty-event-set
Closed

Tenkeren11 wants to merge 2 commits into
wavefnd:masterfrom
Tenkeren11:fix-windows-empty-event-set

Conversation

@Tenkeren11

Copy link
Copy Markdown
Contributor

Summary

  • Return 0 from Windows event_wait when the descriptor set is empty.
  • Avoid calling WSAPoll with nfds = 0.
  • Add a Windows regression test covering an empty event set.

Testing

Ran:

cargo test --locked --target x86_64-pc-windows-msvc --no-default-features --features llvm-target-core64 --test boundary_regressions empty_windows_event_set_returns_zero -- --nocapture

Result: 1 passed, 0 failed.

Fixes #793

@LunaStev LunaStev mentioned this pull request Sep 30, 2026
LunaStev added a commit to LunaStev/Wave that referenced this pull request Oct 2, 2026
Use the Windows sockaddr_un layout and validate UTF-8 pathname bytes before
opening sockets. Enable the existing stream operations and explicit removal,
retaining native errors and closing sockets on failed setup.

Preserve finite and infinite empty event waits through Sleep without calling
WSAPoll with no descriptors. Cover native Windows targets and injected OS
failures, including cleanup errors, byte boundaries, and timeout behavior.

Follow up on wavefnd#796 and wavefnd#797; address wavefnd#795 and wavefnd#793.

Signed-off-by: LunaStev <luna@lunastev.org>
@LunaStev

LunaStev commented Oct 2, 2026

Copy link
Copy Markdown
Member

The original commits have been incorporated into #839, preserving their author and messages. Follow-up changes address the review feedback on finite and infinite empty-set waits and add regression coverage. Closing this PR as superseded by #839, which is still open and awaiting validation and merge. Thank you for the contribution.

@LunaStev LunaStev closed this Oct 2, 2026
LunaStev added a commit that referenced this pull request Oct 2, 2026
…#839)

* Publish validated master builds through a rolling Nightly release

Signed-off-by: LunaStev <luna@lunastev.org>

* fix(#795): Support pathname Unix-domain streams on Windows

The Windows local-address provider always returns -95, and the Windows branches of `_unix_socket` and `unix_remove` do the same. Consequently, portabl...

Signed-off-by: chenzeyan54-commits <chenzeyan54-commits@users.noreply.github.com>
(cherry picked from commit 950ae4f)
Signed-off-by: LunaStev <luna@lunastev.org>

* fix(windows): handle empty event sets without WSAPoll

(cherry picked from commit dd90054)
Signed-off-by: LunaStev <luna@lunastev.org>

* style: format boundary regression test

(cherry picked from commit a5520b1)
Signed-off-by: LunaStev <luna@lunastev.org>

* Complete Windows pathname streams and preserve empty wait timeouts

Use the Windows sockaddr_un layout and validate UTF-8 pathname bytes before
opening sockets. Enable the existing stream operations and explicit removal,
retaining native errors and closing sockets on failed setup.

Preserve finite and infinite empty event waits through Sleep without calling
WSAPoll with no descriptors. Cover native Windows targets and injected OS
failures, including cleanup errors, byte boundaries, and timeout behavior.

Follow up on #796 and #797; address #795 and #793.

Signed-off-by: LunaStev <luna@lunastev.org>

* Fix static mock linking and make WASI host startup synchronous

Link OS-boundary mocks without PIE, exercise fatal WASI exits with live host handles, and point the README build badge at ci.yml.

Signed-off-by: LunaStev <luna@lunastev.org>

---------

Signed-off-by: LunaStev <luna@lunastev.org>
Signed-off-by: chenzeyan54-commits <chenzeyan54-commits@users.noreply.github.com>
Co-authored-by: chenzeyan54-commits <chenzeyan54@gmail.com>
Co-authored-by: tenkeren11 <332676327+Tenkeren11@users.noreply.github.com>
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.

Handle empty Windows event sets without calling WSAPoll

2 participants