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

[3.11] gh-119506: fix _io.TextIOWrapper.write() write during flush (#119507) #120314

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

methane
Copy link
Member

@methane methane commented Jun 10, 2024

This PR is backport of #119507

This PR fixes TextIOWrapper's inner buffer breakage.
The bug caused assertion error when Python debug build.
I am not sure it can cause crash on release build. The bug will cause:

  • Lost buffered data, and,
  • NUL bytes can be written instead of the lost data.

Since this bug is not verified to cause crash (and DoS) in release build, I am not sure this PR is merged into security fix branches.
But this bug can cause serious bug (data lost/breakage). So I created this PR before details went away from my head.

@hugovk
Copy link
Member

hugovk commented Aug 9, 2024

@pablogsal Can this be merged into 3.11 or 3.10?

@hugovk hugovk added the pending The issue will be closed if no feedback is provided label Aug 9, 2024
@pablogsal
Copy link
Member

I think it makes sense to back port although doesn't seem too critical IMHO

@terryjreedy
Copy link
Member

Only 'special' people can merge into 3.11 and before.
@pablogsal Can you still do so as release manager? @ambv I know you can. Pablo approved.
Please one of you merge or close this orphaned backport.

@hugovk
Copy link
Member

hugovk commented Aug 9, 2024

I can do it, let's update the PR from 3.11 first to be sure the CI still passes.

@hugovk hugovk enabled auto-merge (squash) August 9, 2024 17:03
@hugovk hugovk merged commit 8a978a7 into python:3.11 Aug 9, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes pending The issue will be closed if no feedback is provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants