-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-128058: Fix test_builtin ImmortalTests #128068
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
On 32-bit systems, _Py_IMMORTAL_INITIAL_REFCNT is defined as 5 << 28, not 7 << 28.
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.
LGTM, but I'm curious about why none of our buildbots caught this. Are none of them 32 bit?
Ah, the WASI job disagrees with me:
|
Sorry, I don't know the difference between
I'm testing with Free Threading. |
I guess I don't fully understand the issue.
So it's not a typo. It's probably what I said in the issue then:
|
On 32-bit systems, it seems like a regular Python build uses |
We do have 32-bit CIs but none with Free Threading. |
We should probably test with buildbots before merging. |
This is getting very confusing. In Lines 104 to 106 in 8a433b6
I'm not so sure this is a good strategy anymore now that there are so many different immortal refcounts in the default build. |
I'm not convinced we need a different reference count for static immortals, that's going to especially complicate things. |
That's the issue gh-128069. |
I'm not sure that I understand your comment correctly. Do you mean that my change is not correct? Or do you mean that you want to modify Py_REFCNT()? |
I updated the branch to retrieve the macOS fix. |
This fix looks good to me. I'm not really suggesting a specific change to
|
Doing my best to understand the issue here. Why do we have a different immortal reference count for free threading? |
Merged, thanks for reviews. |
On 32-bit Free Threading systems, immortal reference count is 5 << 28, instead of 7 << 28. Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
On 32-bit Free Threading systems, immortal reference count is 5 << 28, instead of 7 << 28. Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
On 32-bit systems with Free Threading, _Py_IMMORTAL_INITIAL_REFCNT is defined as 5 << 28, not 7 << 28.