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-1635741: Calling Py_INCREF() after PyModule_AddObject() success to run #18365

Closed
wants to merge 2 commits into from

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Feb 5, 2020

@shihai1991
Copy link
Member Author

Oh, it is generated file, i will check this operation soon.

@shihai1991 shihai1991 changed the title bpo-1635741: Calling Py_DECREF() if PyModule_AddObject() fails to run bpo-1635741: Calling Py_INCREF() after PyModule_AddObject() success to run Feb 5, 2020
@shihai1991
Copy link
Member Author

cc @vstinner Hi, victor. It's a small fix. pls review it if you have free time.

@shihai1991 shihai1991 requested a review from vstinner February 5, 2020 14:26
@vstinner
Copy link
Member

vstinner commented Feb 5, 2020

cc @pablogsal @isidentical

@isidentical
Copy link
Member

I recently saw a PR from @brandtbucher about a more general change that already includes this if I am not mistaken. Check out #17276 (it moves incref after the check by moving check upper). I am in favor of #17276 because it handles the case better also it opened before this PR

@brandtbucher
Copy link
Member

brandtbucher commented Feb 5, 2020

I'm also working my way through the other broken modules in bpo-38823. I need to land #17298 before I can make further progress, though.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Yes, my PR #17276 is a more comprehensive fix.

@brandtbucher brandtbucher added the type-bug An unexpected behavior, bug, or error label Feb 5, 2020
@shihai1991
Copy link
Member Author

Oh, thank you for quick feedback, guys.
I checked Brandt's PRs, its enhance very nice. Pls go ahead, thanks. I will subscribe your PRs ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants