mirror of
https://github.com/python/cpython.git
synced 2026-03-02 11:00:50 +00:00
[3.12] gh-113297: Fix segfault in compiler for with statement with 19 context managers (#113327) (#113404)
This commit is contained in:
parent
4882d508be
commit
9d72a5cae7
4 changed files with 29 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue