-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
In #127524, @mpage suggested adding an assert to check that the list object is locked when calling ensure_shared_on_resize
. This uncovers a few more locking issues.
Additionally, we may return out of the critical section without unlocking here:
Lines 956 to 964 in c7dec02
Py_BEGIN_CRITICAL_SECTION(a); | |
Py_ssize_t n = PyList_GET_SIZE(a); | |
PyObject *copy = list_slice_lock_held(a, 0, n); | |
if (copy == NULL) { | |
return -1; | |
} | |
ret = list_ass_slice_lock_held(a, ilow, ihigh, copy); | |
Py_DECREF(copy); | |
Py_END_CRITICAL_SECTION(); |
Linked PRs
corona10
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error