We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a14254 commit b1607aaCopy full SHA for b1607aa
Python/frame.c
@@ -55,6 +55,11 @@ take_ownership(PyFrameObject *f, _PyInterpreterFrame *frame)
55
frame = (_PyInterpreterFrame *)f->_f_frame_data;
56
frame->stackpointer = (_PyStackRef *)(((char *)frame) + size);
57
frame->f_executable = PyStackRef_DUP(frame->f_executable);
58
+ int stacktop = (int)(frame->stackpointer - frame->localsplus);
59
+ assert(stacktop >= _PyFrame_GetCode(frame)->co_nlocalsplus);
60
+ for (int i = 0; i < stacktop; i++) {
61
+ frame->localsplus[i] = _PyStackRef_StealIfUnborrowed(frame->localsplus[i]);
62
+ }
63
f->f_frame = frame;
64
frame->owner = FRAME_OWNED_BY_FRAME_OBJECT;
65
if (_PyFrame_IsIncomplete(frame)) {
0 commit comments