-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Conversation
Modules/faulthandler.c
Outdated
@@ -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; |
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.
Hum, what do you think of adding a "error:" label which does the DECREF + return NULL?
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.
I actually prefer that. I just wanted to keep the diffs small for all of these.
Should I make the change?
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.
Done.
Thanks. I took the liberty of rewriting the commit message. |
Thanks @brandtbucher for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Thanks @brandtbucher for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
…ythonGH-17250) (cherry picked from commit ac22354) Co-authored-by: Brandt Bucher <[email protected]>
GH-17263 is a backport of this pull request to the 3.8 branch. |
…ythonGH-17250) (cherry picked from commit ac22354) Co-authored-by: Brandt Bucher <[email protected]>
GH-17264 is a backport of this pull request to the 3.7 branch. |
…H-17250) (cherry picked from commit ac22354) Co-authored-by: Brandt Bucher <[email protected]>
…H-17250) (cherry picked from commit ac22354) Co-authored-by: Brandt Bucher <[email protected]>
https://bugs.python.org/issue38823