py/emitbc: Fix bug with BC emitter computing Python stack size.
Previous to this patch the mp_emit_bc_adjust_stack_size function would adjust the current stack size but would not increase the maximum stack size if the current size went above it. This meant that certain Python code (eg a try-finally block with no statements inside it) would not have enough Python stack allocated to it. This patch fixes the problem by always checking if the current stack size goes above the maximum, and adjusting the latter if it does.
Showing
Please register or sign in to comment