Skip to content

[3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong #29588

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
merged 2 commits into from Nov 27, 2021
Merged

[3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong #29588

merged 2 commits into from Nov 27, 2021

Conversation

ghost
Copy link

@ghost ghost commented Nov 17, 2021

Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.
@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@gpshead gpshead self-assigned this Nov 17, 2021
@gpshead
Copy link
Member

gpshead commented Nov 26, 2021

PR #29587 takes care of this on main and should pass through the usual backport automation. I'll likely let it do that to preserve the connection rather than merge this 3.9 targeting PR directly even though the code should be identical.

@gpshead gpshead added the type-bug An unexpected behavior, bug, or error label Nov 27, 2021
@gpshead gpshead merged commit 86c1265 into python:3.9 Nov 27, 2021
@miss-islington
Copy link
Contributor

Thanks @animalize for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-29812 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 27, 2021
…ong (pythonGH-29588)

* Fix thread lock in zlib.Decompress.flush() may go wrong
Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.

backport of python#29587 to 3.9/3.8.
(cherry picked from commit 86c1265)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
@ghost ghost deleted the 3.9_zlib_lock branch March 8, 2022 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants