mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-120321: Fix TSan reported race in gen_clear_frame (gh-142995)
TSan treats compare-exchanges that fail as if they are writes so there is a false positive with the read of gi_frame_state in gen_close.
This commit is contained in:
parent
08bc03ff2a
commit
4ea3c1a047
1 changed files with 1 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ _PyGen_Finalize(PyObject *self)
|
|||
static void
|
||||
gen_clear_frame(PyGenObject *gen)
|
||||
{
|
||||
assert(gen->gi_frame_state == FRAME_CLEARED);
|
||||
assert(FT_ATOMIC_LOAD_INT8_RELAXED(gen->gi_frame_state) == FRAME_CLEARED);
|
||||
_PyInterpreterFrame *frame = &gen->gi_iframe;
|
||||
frame->previous = NULL;
|
||||
_PyFrame_ClearExceptCode(frame);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue