Skip to content

Commit 0cd992c

Browse files
authored
gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one place (GH-96513)
1 parent dde15f5 commit 0cd992c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/compile.c

+1
Original file line numberDiff line numberDiff line change
@@ -7075,6 +7075,7 @@ stackdepth(basicblock *entryblock, int code_flags)
70757075
return -1;
70767076
}
70777077
int new_depth = depth + effect;
7078+
assert(new_depth >= 0); /* invalid code or bug in stackdepth() */
70787079
if (new_depth > maxdepth) {
70797080
maxdepth = new_depth;
70807081
}

0 commit comments

Comments
 (0)