diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-12-23 13:29:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-23 13:29:11 (GMT) |
commit | 9d72a5cae7a545bc3e525e633ae3539869ccc171 (patch) | |
tree | c1b3206c263bb669922003726973fd73776578de /Python/flowgraph.c | |
parent | 4882d508be46eff5ae2d55d82f0aab169a59a0ed (diff) | |
download | cpython-9d72a5cae7a545bc3e525e633ae3539869ccc171.zip cpython-9d72a5cae7a545bc3e525e633ae3539869ccc171.tar.gz cpython-9d72a5cae7a545bc3e525e633ae3539869ccc171.tar.bz2 |
[3.12] gh-113297: Fix segfault in compiler for with statement with 19 context managers (#113327) (#113404)
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r-- | Python/flowgraph.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c index b53e771..fbbe053 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -645,6 +645,7 @@ push_except_block(ExceptStack *stack, cfg_instr *setup) { if (opcode == SETUP_WITH || opcode == SETUP_CLEANUP) { target->b_preserve_lasti = 1; } + assert(stack->depth <= CO_MAXBLOCKS); stack->handlers[++stack->depth] = target; return target; } |