Skip to content

Commit dee04cc

Browse files
committed
Move CHECK_EVAL_BREAKER in ENTER_EXECUTOR
1 parent c915b67 commit dee04cc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ dummy_func(
173173
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
174174
#endif
175175
uintptr_t eval_breaker = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker);
176-
uintptr_t version = _PyFrame_GetCode(frame)->_co_instrumentation_version;
176+
uintptr_t version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
177177
assert((version & _PY_EVAL_EVENTS_MASK) == 0);
178178
DEOPT_IF(eval_breaker != version);
179179
}
@@ -2379,7 +2379,6 @@ dummy_func(
23792379
};
23802380

23812381
tier1 inst(ENTER_EXECUTOR, (--)) {
2382-
CHECK_EVAL_BREAKER();
23832382
PyCodeObject *code = _PyFrame_GetCode(frame);
23842383
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
23852384
assert(executor->vm_data.index == INSTR_OFFSET() - 1);
@@ -2388,6 +2387,7 @@ dummy_func(
23882387
assert(tstate->previous_executor == NULL);
23892388
tstate->previous_executor = Py_None;
23902389
Py_INCREF(executor);
2390+
CHECK_EVAL_BREAKER();
23912391
GOTO_TIER_TWO(executor);
23922392
}
23932393

Python/executor_cases.c.h

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

Python/generated_cases.c.h

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

0 commit comments

Comments
 (0)