-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-67413: Fix segfaults and multiple leaks in the lzma and bz2 modules #7822
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-67413: Fix segfaults and multiple leaks in the lzma and bz2 modules #7822
Conversation
lzma.LZMADecompressor and bz2.BZ2Decompressor objects caused segfaults when their __init__() methods were not called. lzma.LZMADecompressor, lzma.LZMACompressor, bz2.BZ2Compressor, and bz2.BZ2Decompressor objects would leak locks and internal buffers when their __init__() methods were called multiple times.
a6f21a0
to
5152303
Compare
It seems that this PR will also fix the issue described in bpo-33916 (gh-78097)1 Footnotes
|
Hello @ZackerySpytz, since I merged my PR #7843, would you mind to rebase your change please? (merge master into your PR) |
@vstinner Done. |
@ZackerySpytz, please rebase to resolve conflicts. Also, please address @izbyshev's review. Thanks! |
@ZackerySpytz ping |
could this PR be updated? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are merge conflicts.
I took the liberty to fix those; this looks like a PR worth landing, IMO. |
(Removed Victor from the review list, as he's off CPython these days.) |
🤖 New build scheduled with the buildbot fleet by @erlend-aasland for commit c9f1273 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
@kumaraditya303: thanks for the review. I did a small PEP-7 change to the added code in aad76e9. Will land when the CI is green. |
Oh, Miss Islington was faster than GitHub; aad76e9 is now in limbo :) No, my bad: I pushed to my fork instead of to this PR. Darn. |
"The missing piece of puzzle all come together when you least expect it." :) |
Better late than never! Thanks @ZackerySpytz for the initial fix and @erlend-aasland for the updates. |
…es (pythonGH-7822) lzma.LZMADecompressor and bz2.BZ2Decompressor objects caused segfaults when their `__init__()` methods were not called. lzma.LZMADecompressor, lzma.LZMACompressor, bz2.BZ2Compressor, and bz2.BZ2Decompressor objects would leak locks and internal buffers when their `__init__()` methods were called multiple times. https://bugs.python.org/issue23224
lzma.LZMADecompressor and bz2.BZ2Decompressor objects caused
segfaults when their
__init__()
methods were not called.lzma.LZMADecompressor, lzma.LZMACompressor, bz2.BZ2Compressor,
and bz2.BZ2Decompressor objects would leak locks and internal buffers
when their
__init__()
methods were called multiple times.https://bugs.python.org/issue23224
Automerge-Triggered-By: GH:erlend-aasland