Skip to content

Fix maximum send length on non-{Mac, Windows} platforms - #162915

Open
fs-rachel wants to merge 2 commits into
rust-lang:mainfrom
fs-rachel:fix-max-send-length
Open

fs-rachel wants to merge 2 commits into
rust-lang:mainfrom
fs-rachel:fix-max-send-length

Conversation

@fs-rachel

Copy link
Copy Markdown
Contributor

On these platforms, send takes a size_t length, but returns an ssize_t count of bytes written. This means that the actual limit is ssize_t::MAX, not size_t::MAX.

On QNX, the limit needs to be reduced further, to c_int::MAX (just like for Mac), because larger send calls return incorrect counts of bytes written.

On these platforms, `send` takes a `size_t` length, but returns an
`ssize_t` count of bytes written. This means that the actual limit
is `ssize_t::MAX`, not `size_t::MAX`.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 17, 2026
@rustbot

rustbot commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

r? @aapoalas

rustbot has assigned @aapoalas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 7 candidates

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-pr-check-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#15 2.904 Building wheels for collected packages: reuse
#15 2.905   Building wheel for reuse (pyproject.toml): started
#15 3.122   Building wheel for reuse (pyproject.toml): finished with status 'done'
#15 3.123   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132857 sha256=6a78a69541e3df9c7c106367722bab90241125ee6b7cdb81c5e40637268f85a9
#15 3.124   Stored in directory: /tmp/pip-ephem-wheel-cache-xbrir7t9/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#15 3.126 Successfully built reuse
#15 3.126 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#15 3.532 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#15 3.533 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#15 DONE 3.6s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants