Skip to content

bpo-33916: Fix bz2 and lzma init when called twice #7843

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 1 commit into from
Jun 23, 2018
Merged

bpo-33916: Fix bz2 and lzma init when called twice #7843

merged 1 commit into from
Jun 23, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 21, 2018

bz2, lzma: When Decompressor.init() is called twice, free the old
lock to not leak memory.

https://bugs.python.org/issue33916

bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.
@vstinner
Copy link
Member Author

PR #7822 change fixes more cases, but it's more difficult (and maybe too risky) to backport. I propose to first apply this change to all branches, then only apply PR #7822 to master: https://bugs.python.org/issue23224#msg320146

@ZackerySpytz
Copy link
Contributor

@vstinner I had already created a PR which fixes these problems (as I posted on the bug tracker). Also, your fix is incomplete: internal buffers are still leaked.

@vstinner
Copy link
Member Author

This change is the minimum change to fix https://bugs.python.org/issue33916 to allow me to implement the detection of handle leaks on Windows: https://bugs.python.org/issue18174

@vstinner
Copy link
Member Author

@vstinner I had already created a PR which fixes these problems (as I posted on the bug tracker). Also, your fix is incomplete: internal buffers are still leaked.

Right. Please read my comments :-)

@ZackerySpytz
Copy link
Contributor

Yes, I saw you just posted :).

@vstinner
Copy link
Member Author

@serhiy-storchaka: Hello! What do you think of applying this fix to all branches, but then work on PR #7822 for a better fix in the master branch?

@vstinner vstinner merged commit 9b7cf75 into python:master Jun 23, 2018
@vstinner vstinner deleted the lzma_init branch June 23, 2018 08:35
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-7871 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2018
bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.
(cherry picked from commit 9b7cf75)

Co-authored-by: Victor Stinner <[email protected]>
@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9b7cf757213cf4d7ae1d436d86ad53f5ba362d55 3.6

@bedevere-bot
Copy link

GH-7872 is a backport of this pull request to the 3.6 branch.

miss-islington added a commit that referenced this pull request Jun 23, 2018
bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.
(cherry picked from commit 9b7cf75)

Co-authored-by: Victor Stinner <[email protected]>
vstinner added a commit that referenced this pull request Jun 23, 2018
bz2, lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.

(cherry picked from commit 9b7cf75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants