Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-40645: Fix reference leak in the _hashopenssl extension#26072

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
miss-islington merged 1 commit intopython:mainfromencukou:hashlib-refleak
May 12, 2021

Conversation

@encukou
Copy link
Member

@encukouencukou commentedMay 12, 2021
edited by miss-islington
Loading

ThePyModule_AddObjectRef function doesn't steal a reference, so an extraPy_DECREF is needed.

https://bugs.python.org/issue40645

Automerge-Triggered-By: GH:tiran

The PyModule_AddObjectRef function doesn't steal a reference,so an extra Py_DECREF is needed.
@tiran
Copy link
Member

Thank you!

@erlend-aasland
Copy link
Contributor

erlend-aasland commentedMay 12, 2021
edited
Loading

There's also three leaks in the preceding for-loop:name_obj andfunc => fixed in 26079

Comment on lines 2109 to +2112
if (PyModule_AddObjectRef(module,"_constructors",proxy)<0) {
return-1;
}
Py_DECREF(proxy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Decref in casePyModule_AddObjectRef fails, no?

Suggested change
if (PyModule_AddObjectRef(module,"_constructors",proxy)<0) {
return-1;
}
Py_DECREF(proxy);
intrc=PyModule_AddObjectRef(module,"_constructors",proxy);
Py_DECREF(proxy);
if (rc<0) {
return-1;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

FYI, fixed in#26079

@miss-islington
Copy link
Contributor

@encukou: Status check is done, and it's a success ✅ .

@miss-islingtonmiss-islington merged commit3611db5 intopython:mainMay 12, 2021
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry@encukou, I had trouble checking out the3.10 backport branch.
Please backport usingcherry_picker on command line.
cherry_picker 3611db53f5b854cb6d01ee5ebb5e11c87bcc2df5 3.10

@Mariatta
Copy link
Member

Does this still need backport to 3.10?

@erlend-aasland
Copy link
Contributor

Does this still need backport to 3.10?

I believe so, yes.

cc@pablogsal.

@pablogsal
Copy link
Member

Does this still need backport to 3.10?

I believe so, yes.

cc@pablogsal.

This indeed need to be backported

@erlend-aasland
Copy link
Contributor

I can create a backport of this together with a backport of#26079,@pablogsal. Let me know if that's ok with you,@encukou.

@encukou
Copy link
MemberAuthor

It is. Thank you!

@encukouencukou deleted the hashlib-refleak branchJune 4, 2021 08:00
@erlend-aasland
Copy link
Contributor

Oh, I already did this in#26082 :) Backport is done; no further actions needed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland left review comments

@tirantirantiran approved these changes

Assignees

@miss-islingtonmiss-islington

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

8 participants

@encukou@tiran@erlend-aasland@miss-islington@Mariatta@pablogsal@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp