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

GH-93990: fix refcounting bug in add_subclass in typeobject.c #93989

Merged
merged 1 commit into from Jun 19, 2022

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Jun 18, 2022

No description provided.

@Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jun 18, 2022

Please create an issue.

Also, can you add tests which trigger this bug? If it's too difficult to trigger from Python code, we can forgo the tests.

@kumaraditya303 kumaraditya303 changed the title fix refcounting bug in add_subclass in typeobject.c GH_93990: fix refcounting bug in add_subclass in typeobject.c Jun 18, 2022
@kumaraditya303
Copy link
Contributor Author

@kumaraditya303 kumaraditya303 commented Jun 18, 2022

Also, can you add tests which trigger this bug? If it's too difficult to trigger from Python code, we can forgo the tests.

I don't think this can be done from python. It is an edge case when allocating dict for tp_subclasses causes memory error.

@kumaraditya303 kumaraditya303 changed the title GH_93990: fix refcounting bug in add_subclass in typeobject.c GH-93990: fix refcounting bug in add_subclass in typeobject.c Jun 18, 2022
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Does this need backports?

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 19, 2022

Thanks @kumaraditya303 for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 19, 2022

Thanks @kumaraditya303 for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 19, 2022

Sorry, @kumaraditya303 and @Fidget-Spinner, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 726448ebe15cd78e180c29c9858cb6c10a581524 3.10

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 19, 2022

Sorry @kumaraditya303 and @Fidget-Spinner, I had trouble checking out the 3.11 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 726448ebe15cd78e180c29c9858cb6c10a581524 3.11

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 19, 2022

Thanks @kumaraditya303 for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 19, 2022
…c` (pythonGH-93989)

(cherry picked from commit 726448e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 19, 2022

GH-93998 is a backport of this pull request to the 3.11 branch.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Jun 19, 2022

GH-93999 is a backport of this pull request to the 3.10 branch.

miss-islington added a commit that referenced this issue Jun 19, 2022
…-93989)

(cherry picked from commit 726448e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Fidget-Spinner pushed a commit that referenced this issue Jun 19, 2022
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.

None yet

5 participants