summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-05-15 20:53:55 (GMT)
committerGitHub <noreply@github.com>2023-05-15 20:53:55 (GMT)
commit8a3702f0c79e5a99fcef61e35724f4b9ea3453b8 (patch)
tree4f20790762402485cb474ba3590fd1c3ae4884fc /Python/compile.c
parent26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b (diff)
downloadcpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.zip
cpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.tar.gz
cpython-8a3702f0c79e5a99fcef61e35724f4b9ea3453b8.tar.bz2
gh-104482: Fix error handling bugs in ast.c (#104483)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index f8d0197..bf5e4a5 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -567,6 +567,7 @@ PyCodeObject *
_PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
int optimize, PyArena *arena)
{
+ assert(!PyErr_Occurred());
struct compiler *c = new_compiler(mod, filename, pflags, optimize, arena);
if (c == NULL) {
return NULL;