summaryrefslogtreecommitdiffstatshomepage
path: root/docs/zephyr/tutorial/index.rst
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-01-31 12:56:29 +1100
committerDamien George <damien@micropython.org>2024-01-31 12:56:29 +1100
commit28b18c43fefe6236f899eba79f9a1b2bad134d0f (patch)
tree91496a2288cd9a2b443f04655b2ea6dde7819223 /docs/zephyr/tutorial/index.rst
parent2d7fb9a715d8c9f1f7ba73a62cfd587fa6ffc24a (diff)
downloadmicropython-28b18c43fefe6236f899eba79f9a1b2bad134d0f.tar.gz
micropython-28b18c43fefe6236f899eba79f9a1b2bad134d0f.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/zephyr/tutorial/index.rst')
0 files changed, 0 insertions, 0 deletions