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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a potential deadlock in :c:func:`PyUnicode_InternFromString` and other
interning functions in the :term:`free-threaded build` when called from C++
static local initializers.
2 changes: 1 addition & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -14347,7 +14347,7 @@ intern_common(PyInterpreterState *interp, PyObject *s /* stolen */,
}
#endif

FT_MUTEX_LOCK(INTERN_MUTEX);
FT_MUTEX_LOCK_FLAGS(INTERN_MUTEX, _Py_LOCK_DONT_DETACH);
PyObject *t;
{
int res = PyDict_SetDefaultRef(interned, s, s, &t);
Expand Down
Loading