mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-128955: Fix goto if tlbc creation fails when throwing into a generator (#128957)
We don't have the correct copy of the bytecode and can't update next_instr appropriately, so just unwind.
This commit is contained in:
parent
d95ba9fa11
commit
13c4def692
1 changed files with 1 additions and 1 deletions
|
@ -846,7 +846,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
|
|||
_Py_CODEUNIT *bytecode =
|
||||
_PyEval_GetExecutableCode(tstate, _PyFrame_GetCode(frame));
|
||||
if (bytecode == NULL) {
|
||||
goto error;
|
||||
goto exit_unwind;
|
||||
}
|
||||
ptrdiff_t off = frame->instr_ptr - _PyFrame_GetBytecode(frame);
|
||||
frame->tlbc_index = ((_PyThreadStateImpl *)tstate)->tlbc_index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue