Skip to content

Commit 195c87d

Browse files
add supressions
1 parent 1cb3a6f commit 195c87d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Modules/_asynciomodule.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3766,6 +3766,7 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
37663766
// out the tasks which are done and return it.
37673767
PyObject *tasks = PySet_New(state->eager_tasks);
37683768
if (tasks == NULL) {
3769+
Py_DECREF(loop);
37693770
return NULL;
37703771
}
37713772
int err = 0;
@@ -3806,18 +3807,19 @@ _asyncio_all_tasks_impl(PyObject *module, PyObject *loop)
38063807
Py_DECREF(item);
38073808
}
38083809
Py_DECREF(scheduled_iter);
3809-
Py_DECREF(loop);
38103810
// All the tasks are now in the set, now filter the tasks which are done
38113811
PyObject *res = PySet_New(NULL);
38123812
if (res == NULL) {
38133813
Py_DECREF(tasks);
3814+
Py_DECREF(loop);
38143815
return NULL;
38153816
}
38163817
PyObject *iter = PyObject_GetIter(tasks);
38173818

38183819
if (iter == NULL) {
38193820
Py_DECREF(tasks);
38203821
Py_DECREF(res);
3822+
Py_DECREF(loop);
38213823
return NULL;
38223824
}
38233825

Tools/tsan/suppressions_free_threading.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ race_top:PyThreadState_Clear
4444
# Only seen on macOS, sample: https://gist.github.com/aisk/dda53f5d494a4556c35dde1fce03259c
4545
race_top:set_default_allocator_unlocked
4646
race_top:socket_socketpair
47+
race_top:_PyFrame_GetBytecode
48+
4749

4850
# https://gist.github.com/mpage/6962e8870606cfc960e159b407a0cb40
4951
thread:pthread_create

0 commit comments

Comments
 (0)