mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
GH-94262: Don't create frame objects for frames that aren't yet complete. (GH-94371)
This commit is contained in:
parent
1df9449db2
commit
544531de23
7 changed files with 87 additions and 13 deletions
|
@ -638,11 +638,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 *
|
||||
|
@ -666,7 +665,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue