Uh oh!
There was an error while loading. Please reload this page.
gh-128058: Fix test_builtin ImmortalTests - #128068
Conversation
On 32-bit systems, _Py_IMMORTAL_INITIAL_REFCNT is defined as 5 << 28, not 7 << 28.
ZeroIntensity
left a comment
There was a problem hiding this comment.
LGTM, but I'm curious about why none of our buildbots caught this. Are none of them 32 bit?
vstinner
commented
Dec 18, 2024
Ah, the WASI job disagrees with me: |
vstinner
commented
Dec 18, 2024
Sorry, I don't know the difference between I'm testing with Free Threading. |
I guess I don't fully understand the issue.
ZeroIntensity
commented
Dec 18, 2024
So it's not a typo. It's probably what I said in the issue then:
|
vstinner
commented
Dec 18, 2024
On 32-bit systems, it seems like a regular Python build uses |
vstinner
commented
Dec 18, 2024
We do have 32-bit CIs but none with Free Threading. |
ZeroIntensity
commented
Dec 18, 2024
We should probably test with buildbots before merging. |
colesbury
commented
Dec 18, 2024
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. |
ZeroIntensity
commented
Dec 18, 2024
I'm not convinced we need a different reference count for static immortals, that's going to especially complicate things. |
vstinner
commented
Dec 18, 2024
That's the issue gh-128069. |
vstinner
commented
Dec 19, 2024
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()? |
vstinner
commented
Dec 19, 2024
I updated the branch to retrieve the macOS fix. |
colesbury
commented
Dec 19, 2024
This fix looks good to me. I'm not really suggesting a specific change to
|
ZeroIntensity
commented
Dec 19, 2024
Doing my best to understand the issue here. Why do we have a different immortal reference count for free threading? |
vstinner
commented
Dec 20, 2024
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.