Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

emitbc.c

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