gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in one place (GH-96513)

This commit is contained in:
Irit Katriel 2022-09-07 14:01:57 +01:00 committed by GitHub
parent dde15f5879
commit 0cd992c000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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