Skip to content
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

bpo-38031: Fix a possible assertion failure in _io.FileIO() #15688

Merged

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Sep 5, 2019

Use PyErr_Fetch() / _PyErr_ChainExceptions() when calling
internal_close() on error. The opener may return an invalid
fd, which will cause the close() call in internal_close() to fail.

https://bugs.python.org/issue38031

Use PyErr_Fetch() / _PyErr_ChainExceptions() when calling
internal_close() on error.  The opener may return an invalid
fd, which will cause the close() call in internal_close() to fail.
@aeros aeros added the type-bug An unexpected behavior, bug, or error label Sep 5, 2019
Copy link
Contributor

@aeros aeros left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @ZackerySpytz.

The macOS failures in Azure may be related to https://bugs.python.org/issue37245 and not related to this PR. (Build log: https://dev.azure.com/Python/cpython/_build/results?buildId=49868&view=logs&j=18d1a34d-6940-5fc1-f55b-405e2fba32b1)

2 tests failed: test_functools test_multiprocessing_spawn

Both of the above tests timed out.

Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
@vstinner
Copy link
Member

vstinner commented Sep 6, 2019

cc @serhiy-storchaka @pitrou

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Mostly LGTH. Just address Victor's comment.

@csabella
Copy link
Contributor

csabella commented Feb 4, 2020

@ZackerySpytz, please address the code review. Thanks!

Copy link
Member

@iritkatriel iritkatriel left a comment

Choose a reason for hiding this comment

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

Converted @vstinner's comment into suggestions.

Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Lib/test/test_io.py Outdated Show resolved Hide resolved
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for updating the PR @iritkatriel ;-)

@iritkatriel iritkatriel added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Nov 24, 2022
@iritkatriel iritkatriel self-assigned this Nov 24, 2022
Lib/test/test_io.py Outdated Show resolved Hide resolved
@iritkatriel iritkatriel merged commit d386115 into python:main Nov 25, 2022
@miss-islington
Copy link
Contributor

Thanks @ZackerySpytz for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants