Skip to content

Commit 2547c5b

Browse files
brandtbucherkulikjak
authored andcommitted
pythonGH-113689: Fix broken handling of invalid executors (pythonGH-113694)
1 parent c4e140f commit 2547c5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2378,11 +2378,12 @@ dummy_func(
23782378
stack_pointer = _PyFrame_GetStackPointer(frame);
23792379
}
23802380
else {
2381+
code->co_executors->executors[oparg & 255] = NULL;
23812382
opcode = this_instr->op.code = executor->vm_data.opcode;
23822383
this_instr->op.arg = executor->vm_data.oparg;
23832384
oparg = (oparg & (~255)) | executor->vm_data.oparg;
2384-
code->co_executors->executors[oparg&255] = NULL;
23852385
Py_DECREF(executor);
2386+
next_instr = this_instr;
23862387
DISPATCH_GOTO();
23872388
}
23882389
}

Python/generated_cases.c.h

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)