mirror of
https://github.com/python/cpython.git
synced 2025-07-19 09:15:34 +00:00
GH-104584: Restore frame->stacktop on optimizer error (GH-108953)
This commit is contained in:
parent
6f3c138dfa
commit
6971e40c2e
2 changed files with 3 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
Fix a crash when running with :envvar:`PYTHONUOPS` or :option:`-X uops <-X>`
|
||||||
|
enabled and an error occurs during optimization.
|
|
@ -169,6 +169,7 @@ _PyOptimizer_BackEdge(_PyInterpreterFrame *frame, _Py_CODEUNIT *src, _Py_CODEUNI
|
||||||
if (err <= 0) {
|
if (err <= 0) {
|
||||||
assert(executor == NULL);
|
assert(executor == NULL);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
goto jump_to_destination;
|
goto jump_to_destination;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue