Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
In#127524,@mpage suggested adding an assert to check that the list object is locked when callingensure_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 inc7dec02
| Py_BEGIN_CRITICAL_SECTION(a); | |
| Py_ssize_tn=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(); |