Skip to content

Commit 0f95afc

Browse files
committed
Add stack protection to code gen
1 parent 2c0d99b commit 0f95afc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/codegen.c

+3
Original file line numberDiff line numberDiff line change
@@ -4885,6 +4885,9 @@ codegen_with(compiler *c, stmt_ty s, int pos)
48854885
static int
48864886
codegen_visit_expr(compiler *c, expr_ty e)
48874887
{
4888+
if (Py_EnterRecursiveCall(" during compilation")) {
4889+
return ERROR;
4890+
}
48884891
location loc = LOC(e);
48894892
switch (e->kind) {
48904893
case NamedExpr_kind:

0 commit comments

Comments
 (0)