Uh oh!
There was an error while loading. Please reload this page.
gh-139716: Use the same StackRef flagging scheme for immortals on FT build as on GIL build - #141675
gh-139716: Use the same StackRef flagging scheme for immortals on FT build as on GIL build#141675efimov-mikhail wants to merge 4 commits into
Conversation
efimov-mikhail
commented
Nov 17, 2025
I propose to merge #139717 first and then merge this PR with a proper test change. |
Fidget-Spinner
commented
Nov 17, 2025
We'll need to benchmark this, as it may cause a slowdown with the extra check. |
| 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.
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
commented
Nov 17, 2025
I'll run a benchmark eventually, before we merge. |
Uh oh!
There was an error while loading. Please reload this page.
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
commented
Dec 20, 2025
Ok, I've got it. |
PyStackReffunctions #139716