summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-09-06 20:59:50 (GMT)
committerGitHub <noreply@github.com>2023-09-06 20:59:50 (GMT)
commit6971e40c2e02181e486b52f4f6bf98709d35443c (patch)
treefd98602cad218f83699bc9c0cb314f10bacac283 /Python
parent6f3c138dfa868b32d3288898923bbfa388f2fa5d (diff)
downloadcpython-6971e40c2e02181e486b52f4f6bf98709d35443c.zip
cpython-6971e40c2e02181e486b52f4f6bf98709d35443c.tar.gz
cpython-6971e40c2e02181e486b52f4f6bf98709d35443c.tar.bz2
GH-104584: Restore frame->stacktop on optimizer error (GH-108953)
Diffstat (limited to 'Python')
-rw-r--r--Python/optimizer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/optimizer.c b/Python/optimizer.c
index 8aaf9f9..c6d0f9e 100644
--- a/Python/optimizer.c
+++ b/Python/optimizer.c
@@ -169,6 +169,7 @@ _PyOptimizer_BackEdge(_PyInterpreterFrame *frame, _Py_CODEUNIT *src, _Py_CODEUNI
if (err <= 0) {
assert(executor == NULL);
if (err < 0) {
+ _PyFrame_SetStackPointer(frame, stack_pointer);
return NULL;
}
goto jump_to_destination;