Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59b8c76

Browse files
committed
Move CHECK_EVAL_BREAKER in ENTER_EXECUTOR
1 parent 5fc0d1b commit 59b8c76

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
@@ -172,7 +172,7 @@ dummy_func(
172172
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
173173
#endif
174174
uintptr_t eval_breaker = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker);
175-
uintptr_t version = _PyFrame_GetCode(frame)->_co_instrumentation_version;
175+
uintptr_t version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
176176
assert((version & _PY_EVAL_EVENTS_MASK) == 0);
177177
DEOPT_IF(eval_breaker != version);
178178
}
@@ -2392,7 +2392,6 @@ dummy_func(
23922392
};
23932393

23942394
tier1 inst(ENTER_EXECUTOR, (--)) {
2395-
CHECK_EVAL_BREAKER();
23962395
PyCodeObject *code = _PyFrame_GetCode(frame);
23972396
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
23982397
assert(executor->vm_data.index == INSTR_OFFSET() - 1);
@@ -2401,6 +2400,7 @@ dummy_func(
24012400
assert(tstate->previous_executor == NULL);
24022401
tstate->previous_executor = Py_None;
24032402
Py_INCREF(executor);
2403+
CHECK_EVAL_BREAKER();
24042404
GOTO_TIER_TWO(executor);
24052405
}
24062406

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)