◐ Shell
clean mode source ↗

GH-94262: Don't create frame objects for frames that aren't complete. by markshannon · Pull Request #94371 · python/cpython

Since 3.11 we have moved some low level operations to the bytecode which mean that frames can be in a partially constructed state during GC, or other operations that could expose them to Python code (or third party C code).

We already avoid tracing any instructions before the first RESUME when executing a frame.
This PR prevents creating a frame object before the first RESUME has been reached.