SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 146 Python

gh-148144: Initialize visited on copied interpreter frames (#148143)

_PyFrame_Copy() copied interpreter frames into generator and
frame-object storage without initializing the visited byte. Incremental
GC later reads frame->visited in mark_stacks() on non-start passes, so
copied frames could expose an uninitialized value once they became live
on a thread stack again.

Reset visited when copying a frame so copied frames start with defined
GC bookkeeping state. Preserve lltrace in Py_DEBUG builds.
P
Pablo Galindo Salgado committed
fbfc6ccb0abf362a0ecdc02cd0aa2d16c1a4ce44
Parent: bce96a1
Committed by GitHub <noreply@github.com> on 4/5/2026, 11:23:07 PM