Skip to content

gh-86493: Fix possible leaks in some modules initialization #106768

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
Jul 18, 2023

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 15, 2023

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.

Use new private function _PyModule_AddNew() public function PyModule_Add() instead of PyModule_AddObject().

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
@serhiy-storchaka serhiy-storchaka merged commit 3e65bae into python:main Jul 18, 2023
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the pymodule-add4b branch July 18, 2023 07:50
@miss-islington
Copy link
Contributor

Sorry @serhiy-storchaka, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 3e65baee72131b49f4ce8ca2da568a6f2001ce93 3.12

@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3e65baee72131b49f4ce8ca2da568a6f2001ce93 3.11

@vstinner
Copy link
Member

Nice fix. I like when removing characters fix bugs :-D

About the backport: Python 3.11 and 3.12 don't have PyModule_Add(), so you cannot backport these fixes, no? While it's tempting, I don't think that it's worth it.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jul 18, 2023
…ion (pythonGH-106768)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time..
(cherry picked from commit 3e65bae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

GH-106855 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jul 18, 2023
serhiy-storchaka added a commit that referenced this pull request Jul 18, 2023
…H-106768) (GH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae)
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Jul 18, 2023
…ialization (pythonGH-106768) (pythonGH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae).
(cherry picked from commit a423ddb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jul 19, 2023
…H-106768) (GH-106855) (GH-106863)

[3.11] [3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855)

Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65bae).
(cherry picked from commit a423ddb)
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 25, 2023
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.11 only security fixes label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants