Skip to content

gh-152276: Fix assertion failure when an object becomes immortal while queued for BRC merging - #162316

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
kumaraditya303:gh-152276-brc-immortal-merge
Nov 20, 2026
Merged

kumaraditya303 merged 1 commit into
python:mainfrom
kumaraditya303:gh-152276-brc-immortal-merge

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

In the free-threaded build, an object can be queued for its owning thread to merge its reference count and then become immortal (for example, via sys.intern()) before the queue is processed. Make
_Py_ExplicitMergeRefcount() a no-op for immortal objects instead of asserting.

…l while queued for BRC merging

In the free-threaded build, an object can be queued for its owning thread
to merge its reference count and then become immortal (for example, via
sys.intern()) before the queue is processed. Make
_Py_ExplicitMergeRefcount() a no-op for immortal objects instead of
asserting.
@miss-islington-app

Copy link
Copy Markdown

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Nov 20, 2026

Copy link
Copy Markdown

GH-162318 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 20, 2026
@kumaraditya303
kumaraditya303 deleted the gh-152276-brc-immortal-merge branch November 20, 2026 12:21
kumaraditya303 added a commit that referenced this pull request Nov 20, 2026
…al while queued for BRC merging (GH-162316) (#162318)

gh-152276: Fix assertion failure when an object becomes immortal while queued for BRC merging (GH-162316)
(cherry picked from commit 9e5ab7e)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
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.

1 participant