gh-126312: Don't traverse frozen objects on the free-threaded build#126338
gh-126312: Don't traverse frozen objects on the free-threaded build#126338vstinner merged 17 commits intopython:mainfrom
Conversation
|
Apparently, the fix isn't as stable as I thought. Marking as draft temporarily. |
|
It looks good. |
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…ensity/cpython into fix-nogil-frozen-objects
colesbury
left a comment
There was a problem hiding this comment.
The changes to gc_free_threading.c look good. A few questions about the test case.
I think we also need to update visit_freeze to avoid marking objects with _PyGC_BITS_UNREACHABLE set as frozen.
|
Please also fix |
Done. I'll see if I can come up with a quick test case. If not, it's probably fine to merge that untested, as it's such a small change. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
I was surprised by the "_PyGC_Freeze() no longer freezes unreachable objects" change which is not "directly" related to "Don't traverse frozen objects on the free-threaded build". But this change makes sense.
|
Thanks @ZeroIntensity for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @ZeroIntensity and @vstinner, I could not cleanly backport this to |
|
@ZeroIntensity: Oh, the automated backport to 3.13 failed. Do you want to attempt to fix the cherry-pick conflict? |
|
Merged, thanks @ZeroIntensity. |
…eaded build (pythonGH-126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. (cherry picked from commit d4c72fe) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
GH-126866 is a backport of this pull request to the 3.13 branch. |
…build (GH-126338) (#126866) * Fix merge conflicts. * [3.13] gh-126312: Don't traverse frozen objects on the free-threaded build (GH-126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. (cherry picked from commit d4c72fe) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> --------- Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…uild (python#126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
…uild (python#126338) Also, _PyGC_Freeze() no longer freezes unreachable objects. Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.