mirror of
https://github.com/python/cpython.git
synced 2026-01-08 16:32:55 +00:00
GH-100964: Fix reference cycle in exhausted generator frames (#141112)
This commit is contained in:
parent
25397f9541
commit
92243dc62c
3 changed files with 14 additions and 1 deletions
|
|
@ -2309,9 +2309,9 @@ clear_gen_frame(PyThreadState *tstate, _PyInterpreterFrame * frame)
|
|||
tstate->exc_info = gen->gi_exc_state.previous_item;
|
||||
gen->gi_exc_state.previous_item = NULL;
|
||||
assert(frame->frame_obj == NULL || frame->frame_obj->f_frame == frame);
|
||||
frame->previous = NULL;
|
||||
_PyFrame_ClearExceptCode(frame);
|
||||
_PyErr_ClearExcState(&gen->gi_exc_state);
|
||||
frame->previous = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue