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

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-120321: Fix TSan reported race in gen_clear_frame
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.
  • Loading branch information
colesbury committed Dec 19, 2025
commit 807c03f2cc8b3666e976a60799b60d52a50379a5
2 changes: 1 addition & 1 deletion Objects/genobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading