Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Use more atomic operations
  • Loading branch information
corona10 committed Mar 10, 2024
commit df6fe4fa7ac456ac35d7927ce4bb82519162d3fa
4 changes: 2 additions & 2 deletions Objects/listobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2844,8 +2844,8 @@ list_sort_impl(PyListObject *self, PyObject *keyfunc, int reverse)
final_ob_item = self->ob_item;
i = Py_SIZE(self);
Py_SET_SIZE(self, saved_ob_size);
self->ob_item = saved_ob_item;
self->allocated = saved_allocated;
FT_ATOMIC_STORE_PTR_RELEASE(self->ob_item, saved_ob_item);
FT_ATOMIC_STORE_SSIZE_RELAXED(self->allocated, saved_allocated);
if (final_ob_item != NULL) {
/* we cannot use list_clear() for this because it does not
guarantee that the list is really empty when it returns */
Expand Down