diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-07-04 18:43:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 18:43:12 (GMT) |
commit | 68f5fa668343341b79ce1e23f1d9e773b98fd312 (patch) | |
tree | bc9b4ab897d1addc94ebf52c643e720fb75944d7 /Objects/codeobject.c | |
parent | 8fe0b1d8fa3451e923d7632263be6145a0734468 (diff) | |
download | cpython-68f5fa668343341b79ce1e23f1d9e773b98fd312.zip cpython-68f5fa668343341b79ce1e23f1d9e773b98fd312.tar.gz cpython-68f5fa668343341b79ce1e23f1d9e773b98fd312.tar.bz2 |
[3.11] GH-94262: Don't create frame objects for frames that aren't yet complete. (GH-94371) (#94482)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r-- | Objects/codeobject.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 2471006..4859b1e 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -636,11 +636,10 @@ PyCode_New(int argcount, int kwonlyargcount, exceptiontable); } -static const char assert0[4] = { - LOAD_ASSERTION_ERROR, - 0, - RAISE_VARARGS, - 1 +static const char assert0[6] = { + RESUME, 0, + LOAD_ASSERTION_ERROR, 0, + RAISE_VARARGS, 1 }; PyCodeObject * @@ -664,7 +663,7 @@ PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) if (filename_ob == NULL) { goto failed; } - code_ob = PyBytes_FromStringAndSize(assert0, 4); + code_ob = PyBytes_FromStringAndSize(assert0, 6); if (code_ob == NULL) { goto failed; } |