FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.10] bpo-46417: Fix race condition on setting type __bases__ (GH-30788) by miss-islington · Pull Request #30789 · python/cpython · GitHub

/ cpython Public

[3.10] bpo-46417: Fix race condition on setting type __bases__ (GH-30788) - #30789

Merged
vstinner merged 1 commit into
python:3.10from
miss-islington:backport-f1c6ae3-3.10
Jan 22, 2022
Merged

[3.10] bpo-46417: Fix race condition on setting type __bases__ (GH-30788)#30789
vstinner merged 1 commit into
python:3.10from
miss-islington:backport-f1c6ae3-3.10

Conversation

miss-islington commented Jan 22, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Fix a race condition on setting a type bases attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue46417

Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3)

Co-authored-by: Victor Stinner <vstinner@python.org>

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, good bot.

vstinner merged commit acda9f3 into python:3.10 Jan 22, 2022
miss-islington deleted the backport-f1c6ae3-3.10 branch January 22, 2022 14:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL