gh-129069: fix TSAN-0013 from gh-153852 by xxyzz · Pull Request #154516 · python/cpython · GitHub
Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions Include/cpython/listobject.h
6 changes: 5 additions & 1 deletion Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ _Py_SIZE_impl(PyObject *ob)
{
assert(Py_TYPE(ob) != &PyLong_Type);
assert(Py_TYPE(ob) != &PyBool_Type);
return _PyVarObject_CAST(ob)->ob_size;
#ifdef Py_GIL_DISABLED
return _Py_atomic_load_ssize_relaxed(&(_PyVarObject_CAST(ob)->ob_size));
#else
return _PyVarObject_CAST(ob)->ob_size;
#endif
}

static inline int
Expand Down
1 change: 1 addition & 0 deletions Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_strhex.h" // _Py_strhex_with_sep()
#include "pycore_long.h" // _PyLong_FromUnsignedChar()
#include "pycore_list.h" // _PyList_GetItemRef
#include "pycore_pyatomic_ft_wrappers.h"
#include "bytesobject.h"

Expand Down
9 changes: 9 additions & 0 deletions Objects/stringlib/join.h
Loading