mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-118095: Make invalidating and clearing executors memory safe (GH-118459)
This commit is contained in:
parent
21c09d9f81
commit
f6fab21721
5 changed files with 103 additions and 42 deletions
12
Python/generated_cases.c.h
generated
12
Python/generated_cases.c.h
generated
|
@ -4961,9 +4961,15 @@
|
|||
if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) {
|
||||
CHECK_EVAL_BREAKER();
|
||||
}
|
||||
#if ENABLE_SPECIALIZATION
|
||||
FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, RESUME_CHECK);
|
||||
#endif /* ENABLE_SPECIALIZATION */
|
||||
assert(this_instr->op.code == RESUME ||
|
||||
this_instr->op.code == RESUME_CHECK ||
|
||||
this_instr->op.code == INSTRUMENTED_RESUME ||
|
||||
this_instr->op.code == ENTER_EXECUTOR);
|
||||
if (this_instr->op.code == RESUME) {
|
||||
#if ENABLE_SPECIALIZATION
|
||||
FT_ATOMIC_STORE_UINT8_RELAXED(this_instr->op.code, RESUME_CHECK);
|
||||
#endif /* ENABLE_SPECIALIZATION */
|
||||
}
|
||||
}
|
||||
DISPATCH();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue