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

[3.12] gh-116510: Fix crash during sub-interpreter shutdown by nascheme · Pull Request #124536 · python/cpython · GitHub

/ cpython Public

[3.12] gh-116510: Fix crash during sub-interpreter shutdown - #124536

Merged
nascheme merged 1 commit into
python:3.12from
nascheme:fix_subinterp_crash_gc_head
Sep 27, 2024
Merged

[3.12] gh-116510: Fix crash during sub-interpreter shutdown#124536
nascheme merged 1 commit into
python:3.12from
nascheme:fix_subinterp_crash_gc_head

Conversation

nascheme commented Sep 25, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Fix a bug that can cause a crash when sub-interpreters use "basic" single-phase extension modules. Shared objects could refer to PyGC_Head nodes that had been freed as part of interpreter shutdown.

Fix a bug that can cause a crash when sub-interpreters use "basic"
single-phase extension modules.  Shared objects could refer to PyGC_Head
nodes that had been freed as part of interpreter shutdown.

Copy link
Copy Markdown
Member Author

My fix for this issue is more minimal compared to what was done in gh-30577 (and accidentally reverted in gh-94673). The original fix untracks all GC objects and increfs them. I think that's more than required. We just need to make sure none of them refer to the GC head nodes that we are going to free. At least, I think that's enough and it fixes the weechat crash. Need to check the Kodi crash too.

ericsnowcurrently 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

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

3.12 only security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL