summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp32/tutorial
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-01-31 12:56:29 +1100
committerDamien George <damien@micropython.org>2024-02-16 10:49:14 +1100
commitb979c5a92af5d23bc89c5cc9c6ebb97a36179a53 (patch)
treeda49aa783f80e4a234e4dc6c4205d100a4a78832 /docs/esp32/tutorial
parentf53ee9f12b20ab98df37b71ae0cbcc89d0fd5268 (diff)
downloadmicropython-b979c5a92af5d23bc89c5cc9c6ebb97a36179a53.tar.gz
micropython-b979c5a92af5d23bc89c5cc9c6ebb97a36179a53.zip
py/compile: Fix potential Py-stack overflow in try-finally with return.
If a return is executed within the try block of a try-finally then the return value is stored on the top of the Python stack during the execution of the finally block. In this case the Python stack is one larger than it normally would be in the finally block. Prior to this commit, the compiler was not taking this case into account and could have a Python stack overflow if the Python stack used by the finally block was more than that used elsewhere in the function. In such a scenario the last argument of the function would be clobbered by the top-most temporary value used in the deepest Python expression/statement. This commit fixes that case by making sure enough Python stack is allocated to the function. Fixes issue #13562. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/esp32/tutorial')
0 files changed, 0 insertions, 0 deletions