Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
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 commentedNov 17, 2025
I propose to merge#139717 first and then merge this PR with a proper test change. |
Fidget-Spinner commentedNov 17, 2025
We'll need to benchmark this, as it may cause a slowdown with the extra check. |
Include/internal/pycore_stackref.h Outdated
| assert(((uintptr_t)obj&Py_TAG_BITS)==0); | ||
| assert(obj!=NULL); | ||
| if (_PyObject_HasDeferredRefcount(obj)) { | ||
| if (_PyObject_HasDeferredRefcount(obj)||_Py_IsImmortal(obj)) { |
There was a problem hiding this comment.
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 commentedNov 17, 2025
I'll run a benchmark eventually, before we merge. |
Uh oh!
There was an error while loading.Please reload this page.
colesbury left a comment
There was a problem hiding this 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:
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 phrase |
efimov-mikhail commentedDec 20, 2025
Ok, I've got it. |
Uh oh!
There was an error while loading.Please reload this page.
PyStackReffunctions #139716