]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Wed, 7 Sep 2022 13:01:57 +0000 (14:01 +0100)
committerGitHub <noreply@github.com>
Wed, 7 Sep 2022 13:01:57 +0000 (14:01 +0100)
Python/compile.c

index 862999d87b8512dcb17ecb97a44e481a8319a304..33a8679fd8888ae02a2eb368b6a221cab89738c3 100644 (file)
@@ -7075,6 +7075,7 @@ stackdepth(basicblock *entryblock, int code_flags)
                 return -1;
             }
             int new_depth = depth + effect;
+            assert(new_depth >= 0); /* invalid code or bug in stackdepth() */
             if (new_depth > maxdepth) {
                 maxdepth = new_depth;
             }