mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
[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>
This commit is contained in:
parent
8fe0b1d8fa
commit
68f5fa6683
7 changed files with 87 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue