gh-113753: Clear finalized bit when putting PyAsyncGenASend back into free list (#113754)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_ceval.h" // _PyEval_EvalFrame()
|
||||
#include "pycore_frame.h" // _PyInterpreterFrame
|
||||
#include "pycore_gc.h" // _PyGC_CLEAR_FINALIZED()
|
||||
#include "pycore_genobject.h" // struct _Py_async_gen_state
|
||||
#include "pycore_modsupport.h" // _PyArg_CheckPositional()
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
@@ -1739,6 +1740,7 @@ async_gen_asend_dealloc(PyAsyncGenASend *o)
|
||||
#endif
|
||||
if (state->asend_numfree < _PyAsyncGen_MAXFREELIST) {
|
||||
assert(PyAsyncGenASend_CheckExact(o));
|
||||
_PyGC_CLEAR_FINALIZED((PyObject *)o);
|
||||
state->asend_freelist[state->asend_numfree++] = o;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user