Skip to content

bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong #29587

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

bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong #29587

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.
@gpshead
Copy link
Member

gpshead commented Nov 26, 2021

PR #29588 does this for 3.9; as the backport automation may fail for 3.9/3.8 I'll use that for those if necessary.

@gpshead gpshead merged commit 7edb627 into python:main 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, 3.9, 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @animalize and @gpshead, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7edb6270a78c695e4c2ae2432797dc18105374fc 3.9

@bedevere-bot
Copy link

GH-29811 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Nov 27, 2021
@miss-islington
Copy link
Contributor

Sorry @animalize and @gpshead, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 7edb6270a78c695e4c2ae2432797dc18105374fc 3.8

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 27, 2021
…ythonGH-29587)

* Fix thread lock in zlib.Decompress.flush() may go wrong

Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.
(cherry picked from commit 7edb627)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
@gpshead gpshead added the type-bug An unexpected behavior, bug, or error label Nov 27, 2021
gpshead pushed a commit that referenced this pull request Nov 27, 2021
…ong (GH-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 #29587 to 3.9/3.8.
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>
miss-islington added a commit that referenced this pull request Nov 27, 2021
…rong (GH-29587) (GH-29811)

* Fix thread lock in zlib.Decompress.flush() may go wrong

Getting `.unconsumed_tail` before acquiring the thread lock may mix up decompress state.
(cherry picked from commit 7edb627)


Co-authored-by: Ma Lin <animalize@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
@ghost ghost deleted the zlib_lock branch March 21, 2022 11:51
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.

5 participants