mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
[3.13] gh-143880: Fix data race in functools.partial in free threading build (GH-143882) (#145435)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
parent
609a6f43e3
commit
fb340275c4
2 changed files with 3 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
Fix data race in :func:`functools.partial` in the :term:`free threading` build.
|
||||
|
|
@ -220,7 +220,9 @@ partial_vectorcall_fallback(PyThreadState *tstate, partialobject *pto,
|
|||
PyObject *const *args, size_t nargsf,
|
||||
PyObject *kwnames)
|
||||
{
|
||||
#ifndef Py_GIL_DISABLED
|
||||
pto->vectorcall = NULL;
|
||||
#endif
|
||||
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
|
||||
return _PyObject_MakeTpCall(tstate, (PyObject *)pto,
|
||||
args, nargs, kwnames);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue