Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-139716: Use the same StackRef flagging scheme for immortals on FT build as on GIL build#141675

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@efimov-mikhail
Copy link
Member

@efimov-mikhailefimov-mikhail commentedNov 17, 2025
edited by bedevere-appbot
Loading

@efimov-mikhail
Copy link
MemberAuthor

I propose to merge#139717 first and then merge this PR with a proper test change.
IMO, it'd be better to have exactly the same stackref flags on 3 different builds (GIL, FT, STACKREF_DEBUG) to reduce cognitive load.

sergey-miryanov and Fidget-Spinner reacted with thumbs up emoji

@Fidget-Spinner
Copy link
Member

We'll need to benchmark this, as it may cause a slowdown with the extra check.

efimov-mikhail reacted with thumbs up emoji

assert(((uintptr_t)obj&Py_TAG_BITS)==0);
assert(obj!=NULL);
if (_PyObject_HasDeferredRefcount(obj)) {
if (_PyObject_HasDeferredRefcount(obj)||_Py_IsImmortal(obj)) {

Choose a reason for hiding this comment

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

I think we should just set immortal objects as having deferred refcount too in_Py_SetImmortal, that way this iwll just be a single check. Though it's been some time since I worked on FT so I don't know the implications of that (I think there should be none?)

@Fidget-Spinner
Copy link
Member

We'll need to benchmark this, as it may cause a slowdown with the extra check.

I'll run a benchmark eventually, before we merge.

efimov-mikhail reacted with thumbs up emoji

Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

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

This scheme slows things down. See:

@bedevere-app
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phraseI have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@efimov-mikhail
Copy link
MemberAuthor

Ok, I've got it.
What do you think about going in the opposite direction?
#143024

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sergey-miryanovsergey-miryanovsergey-miryanov left review comments

@Fidget-SpinnerFidget-SpinnerFidget-Spinner left review comments

@colesburycolesburycolesbury requested changes

@ZeroIntensityZeroIntensityAwaiting requested review from ZeroIntensityZeroIntensity is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@efimov-mikhail@Fidget-Spinner@sergey-miryanov@colesbury

[8]ページ先頭

©2009-2025 Movatter.jp