Skip to content

servers: wrap bufconn fake ports within the valid range - #367

Merged
meling merged 1 commit into
masterfrom
fix/366/bufconn-port-wrap
Oct 13, 2026
Merged

meling merged 1 commit into
masterfrom
fix/366/bufconn-port-wrap

Conversation

@meling

@meling meling commented Oct 13, 2026

Copy link
Copy Markdown
Member

Fixes #366.

The bufconn address counter is process-wide and never reset, so -count=10000 of TestOnewayCalls (13 addresses per run) overflowed the port range after about 5,500 runs.
The port now wraps within 10000-65535.

Verified: -count=10000 of TestOnewayCalls passes.

The bufconn registry's process-wide counter never reset, so a long
-count run passed port 65535 and every later test failed with an
invalid address. Wrap the port; addresses only need to be distinct
among the listeners alive at once.

Closes: #366
Copilot AI balanced review requested due to automatic review settings October 13, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@meling
meling merged commit 0b6386b into master Oct 13, 2026
3 checks passed
@meling
meling deleted the fix/366/bufconn-port-wrap branch October 13, 2026 09:55
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.

testutils: bufconn fake addresses overflow the port range in long -count runs

2 participants