• Damien George's avatar
    py/emitbc: Fix bug with BC emitter computing Python stack size. · 8f064e46
    Damien George authored
    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.
    8f064e46
emitbc.c 36.2 KB