Crash report
This was discovered in an asyncio program when interrupted with CTRL - C.
Minimal Reproducer:
import gc
import inspect
gc.set_threshold(1, 0, 0)
f = []
def cb(*args):
f.append(inspect.stack())
gc.callbacks.append(cb)
def gen():
yield 1
g = gen()
g.__next__()
Error messages
python: Python/ceval.c:5436: _PyEval_EvalFrameDefault: Assertion `frame->frame_obj == NULL' failed.
Aborted (core dumped)
Your environment
- CPython versions tested on: Python 3.12.0a0 51fd4de, Python 3.11.0b3+ 41e4b42
- Operating system and architecture: Linux 5.4.0-1074-azure
cc @markshannon @pablogsal