diff options
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r-- | Python/executor_cases.c.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 9226b7a4e5d..1db8e506732 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -4152,9 +4152,13 @@ args[-1] = self; init_frame = _PyEvalFramePushAndInit( tstate, init_func, NULL, args-1, oparg+1, NULL, shim); - frame->return_offset = 1 + INLINE_CACHE_ENTRIES_CALL; stack_pointer += -2 - oparg; assert(WITHIN_STACK_BOUNDS()); + if (init_frame == NULL) { + _PyEval_FrameClearAndPop(tstate, shim); + JUMP_TO_ERROR(); + } + frame->return_offset = 1 + INLINE_CACHE_ENTRIES_CALL; /* Account for pushing the extra frame. * We don't check recursion depth here, * as it will be checked after start_frame */ |