Skip to content
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

bpo-38823: Clean up refleaks in faulthandler initialization. #17250

Merged
merged 3 commits into from
Nov 19, 2019

Conversation

brandtbucher
Copy link
Member

@brandtbucher brandtbucher commented Nov 19, 2019

@brandtbucher
Copy link
Member Author

@vstinner

@@ -1334,22 +1334,32 @@ PyInit_faulthandler(void)
#ifdef MS_WINDOWS
/* RaiseException() codes (prefixed by an underscore) */
if (PyModule_AddIntConstant(m, "_EXCEPTION_ACCESS_VIOLATION",
EXCEPTION_ACCESS_VIOLATION))
EXCEPTION_ACCESS_VIOLATION)) {
Py_DECREF(m);
return NULL;
Copy link
Member

Choose a reason for hiding this comment

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

Hum, what do you think of adding a "error:" label which does the DECREF + return NULL?

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually prefer that. I just wanted to keep the diffs small for all of these.

Should I make the change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@vstinner vstinner merged commit ac22354 into python:master Nov 19, 2019
@vstinner
Copy link
Member

Thanks. I took the liberty of rewriting the commit message.

@miss-islington
Copy link
Contributor

Thanks @brandtbucher for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 19, 2019
@bedevere-bot
Copy link

GH-17263 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 19, 2019
@bedevere-bot
Copy link

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

miss-islington added a commit that referenced this pull request Nov 19, 2019
miss-islington added a commit that referenced this pull request Nov 19, 2019
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
@brandtbucher brandtbucher deleted the faulthandler branch July 21, 2022 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants