Skip to content

bpo-41687: Fix error handling in Solaris sendfile implementation #22128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kulikjak
Copy link
Contributor

@kulikjak kulikjak commented Sep 7, 2020

I just realized that my recent PR with sendfile on Solaris (PR 22040) has broken error handling.

Sorry for that, this simple followup fixes that.

https://bugs.python.org/issue41687

Automerge-Triggered-By: @1st1

@1st1
Copy link
Member

1st1 commented Sep 8, 2020

I just realized that my recent PR with sendfile on Solaris (PR 22040) has broken error handling.

How is it broken?

@kulikjak
Copy link
Contributor Author

kulikjak commented Sep 9, 2020

I used new variable res for fstat and the enclosing while loop, but not for the error checking block right below that (it checks ret rather than res).

if (ret < 0)
    return (!async_err) ? posix_error() : NULL;

@1st1
Copy link
Member

1st1 commented Sep 9, 2020

Got it!

@miss-islington
Copy link
Contributor

@kulikjak: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit fa8c9e7 into python:master Sep 9, 2020
@ambv ambv added the needs backport to 3.9 only security fixes label Sep 16, 2020
@miss-islington
Copy link
Contributor

Thanks @kulikjak for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-22274 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Sep 16, 2020
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 16, 2020
…honGH-22128)

I just realized that my recent PR with sendfile on Solaris ([PR 22040](python#22040)) has broken error handling.

Sorry for that, this simple followup fixes that.

Automerge-Triggered-By: @1st1
(cherry picked from commit fa8c9e7)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
miss-islington added a commit that referenced this pull request Sep 16, 2020
…22128)

I just realized that my recent PR with sendfile on Solaris ([PR 22040](#22040)) has broken error handling.

Sorry for that, this simple followup fixes that.

Automerge-Triggered-By: @1st1
(cherry picked from commit fa8c9e7)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
…honGH-22128)

I just realized that my recent PR with sendfile on Solaris ([PR 22040](python#22040)) has broken error handling.

Sorry for that, this simple followup fixes that.

Automerge-Triggered-By: @1st1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants