Skip to content

Commit

Permalink
fix TSAN
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Sep 25, 2024
1 parent 17fe79c commit f573fa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Include/internal/pycore_cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ PyCell_SwapTakeRef(PyCellObject *cell, PyObject *value)
{
PyObject *old_value;
Py_BEGIN_CRITICAL_SECTION(cell);
old_value = cell->ob_ref;
cell->ob_ref = value;
FT_ATOMIC_STORE_PTR_RELAXED(old_value, cell->ob_ref);
FT_ATOMIC_STORE_PTR_RELAXED(cell->ob_ref, value);
Py_END_CRITICAL_SECTION();
return old_value;
}
Expand Down

0 comments on commit f573fa2

Please sign in to comment.