Skip to content
Merged
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
gh-123828: Fix data race in _interpchannels._waiting_release (GH-12…
…4107)

(cherry picked from commit f39dea3)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
  • Loading branch information
Zheaoli authored and miss-islington committed Oct 2, 2025
commit 1f126237a0cd7540ab2b2a59c96904c509268a17
3 changes: 1 addition & 2 deletions Lib/test/test__interpchannels.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time
import unittest

from test.support import import_helper, skip_if_sanitizer
from test.support import import_helper

_channels = import_helper.import_module('_interpchannels')
from concurrent.interpreters import _crossinterp
Expand Down Expand Up @@ -365,7 +365,6 @@ def test_shareable(self):
#self.assertIsNot(got, obj)


@skip_if_sanitizer('gh-129824: race on _waiting_release', thread=True)
class ChannelTests(TestBase):

def test_create_cid(self):
Expand Down
2 changes: 1 addition & 1 deletion Modules/_interpchannelsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,12 @@ _waiting_release(_waiting_t *waiting, int received)
assert(!waiting->received);

waiting->status = WAITING_RELEASING;
PyThread_release_lock(waiting->mutex);
if (waiting->received != received) {
assert(received == 1);
waiting->received = received;
}
waiting->status = WAITING_RELEASED;
PyThread_release_lock(waiting->mutex);
}

static void
Expand Down
Loading