gh-113753: Clear finalized bit when putting PyAsyncGenASend back into free list (#113754)

This commit is contained in:
Sam Gross 2024-01-10 13:18:38 -05:00 committed by GitHub
parent 901a971e16
commit 73ae2023a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 0 deletions

View file

@ -122,6 +122,10 @@ static inline void _PyGC_SET_FINALIZED(PyObject *op) {
PyGC_Head *gc = _Py_AS_GC(op);
_PyGCHead_SET_FINALIZED(gc);
}
static inline void _PyGC_CLEAR_FINALIZED(PyObject *op) {
PyGC_Head *gc = _Py_AS_GC(op);
gc->_gc_prev &= ~_PyGC_PREV_MASK_FINALIZED;
}
/* GC runtime state */