Skip to content

gh-154324: Fix os.sendfile() error reporting on Solaris#154327

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:illumos-sendfile-errors
Open

gh-154324: Fix os.sendfile() error reporting on Solaris#154327
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:illumos-sendfile-errors

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 21, 2026

Copy link
Copy Markdown
Member

illumos sendfile(3EXT) returns the number of transferred bytes by adding it to *off without initializing it, so the offset cannot be used to detect a partial write when the call fails before writing any data, and errors were reported as successful transfers.

Use sendfilev(3EXT) instead, which reports the number of transferred bytes in an explicit out parameter.

illumos sendfile(3EXT) returns the number of transferred bytes by adding
it to the offset without initializing it, so the offset cannot be used to
detect a partial write.  Use sendfilev(3EXT), which reports the number of
transferred bytes in an explicit out parameter.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 21, 2026
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

@kulikjak, could you please look at this and verify if it works on real Solaris?

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

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant