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

Skip to content

Commit 88f8634

Browse files
committed
Move CHECK_EVAL_BREAKER in ENTER_EXECUTOR
1 parent 83315d6 commit 88f8634

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ dummy_func(
171171
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
172172
#endif
173173
uintptr_t eval_breaker = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker);
174-
uintptr_t version = _PyFrame_GetCode(frame)->_co_instrumentation_version;
174+
uintptr_t version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
175175
assert((version & _PY_EVAL_EVENTS_MASK) == 0);
176176
DEOPT_IF(eval_breaker != version);
177177
}
@@ -2391,7 +2391,6 @@ dummy_func(
23912391
};
23922392

23932393
tier1 inst(ENTER_EXECUTOR, (--)) {
2394-
CHECK_EVAL_BREAKER();
23952394
PyCodeObject *code = _PyFrame_GetCode(frame);
23962395
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
23972396
assert(executor->vm_data.index == INSTR_OFFSET() - 1);
@@ -2400,6 +2399,7 @@ dummy_func(
24002399
assert(tstate->previous_executor == NULL);
24012400
tstate->previous_executor = Py_None;
24022401
Py_INCREF(executor);
2402+
CHECK_EVAL_BREAKER();
24032403
GOTO_TIER_TWO(executor);
24042404
}
24052405

Python/generated_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.

0 commit comments

Comments
 (0)