Skip to content

Commit fb614f1

Browse files
committed
Add some asserts to _PyFrame_New_NoTrack
1 parent 2e2d4c3 commit fb614f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Objects/frameobject.c

+2
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,9 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyFrameConstructor *con, PyObject *l
873873
assert(con->fc_builtins != NULL);
874874
assert(con->fc_code != NULL);
875875
assert(locals == NULL || PyMapping_Check(locals));
876+
assert(PyCode_Check(con->fc_code));
876877
PyCodeObject *code = (PyCodeObject *)con->fc_code;
878+
assert(_PyCode_IsHydrated(code));
877879

878880
PyFrameObject *f = frame_alloc(code, localsarray);
879881
if (f == NULL) {

0 commit comments

Comments
 (0)