Skip to content

Comments

Cowns: Fix Cown switch to be owned by GC#67

Merged
xFrednet merged 2 commits intomjp41:regions-mainfrom
kulisak12:cowns-gc-fix
Feb 17, 2026
Merged

Cowns: Fix Cown switch to be owned by GC#67
xFrednet merged 2 commits intomjp41:regions-mainfrom
kulisak12:cowns-gc-fix

Conversation

@kulisak12
Copy link

No description provided.

@@ -678,7 +678,7 @@ int _PyCown_SwitchFromIpToGc(_PyCownObject *self, Py_region_t *contained_region)
return 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 1;
*contained_region = NULL_REGION;
return 1;


if (_Py_atomic_compare_exchange_uint64(&self->owning_ip, &ipid, GC_IPID)) {
if (!_Py_atomic_compare_exchange_uint64(&self->owning_ip, &ipid, GC_IPID)) {
return -1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return -1;
*contained_region = NULL_REGION;
return -1;

@xFrednet xFrednet changed the title Fix trivial bugs in cown interface for GC Cowns: Fix trivial bugs in cown interface for GC Feb 17, 2026
@xFrednet xFrednet changed the title Cowns: Fix trivial bugs in cown interface for GC Cowns: Fix Cown switch to be owned by GC Feb 17, 2026
@xFrednet xFrednet merged commit 6ebb117 into mjp41:regions-main Feb 17, 2026
2 of 3 checks passed
@kulisak12 kulisak12 deleted the cowns-gc-fix branch February 17, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants