-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-111942: Fix crashes in TextIOWrapper.reconfigure() #111976
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
gh-111942: Fix crashes in TextIOWrapper.reconfigure() #111976
Conversation
serhiy-storchaka
commented
Nov 10, 2023
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Fix crash when encoding is not string or None.
- Fix crash when both line_buffering and write_through raise exception when converted ti int.
- Add a number of tests for constructor and reconfigure() method with invalid arguments.
- Issue: TextIOWrapper.reconfigure() crashes if encoding is not string or None #111942
* Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.
to:
Then clinic will do the type check. This makes the |
It is more complex change, some code uses I plan such changes, but I am not sure that they will be backported. On other hand, the fix for a crash should be backported. |
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…-111976) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments. (cherry picked from commit ee06fff) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-112058 is a backport of this pull request to the 3.12 branch. |
…-111976) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments. (cherry picked from commit ee06fff) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-112059 is a backport of this pull request to the 3.11 branch. |
|
|
…) (GH-112058) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments. (cherry picked from commit ee06fff) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
@serhiy-storchaka: test_io now fails if Python is built in release mode.
This issue now prevents to make any further change, since Address Sanitizer builds Python in release mode and fails. |
I wrote #112067 to fix the regression. |
…) (GH-112059) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments. (cherry picked from commit ee06fff) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…-111976) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.
…-111976) * Fix crash when encoding is not string or None. * Fix crash when both line_buffering and write_through raise exception when converted ti int. * Add a number of tests for constructor and reconfigure() method with invalid arguments.