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
8 changes: 7 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,13 @@ def internal(*args, **kwargs):
import_module('_testcapi')
return test(*args, **kwargs)

return cpython_only(internal)
# gh-162144: set_nomemory() and call_with_nomemory() of _testcapi are not
# thread safe and emit warnings when using a thread sanitizer (TSan).
use_tsan = check_sanitizer(thread=True)
reason ='not working with thread sanitizer (gh-157415)'
skip_if_tsan = unittest.skipIf(use_tsan, reason)

return cpython_only(skip_if_tsan(internal))

def bigaddrspacetest(f):
"""Decorator for tests that fill the address space."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Skip ``@support.nomemtest`` tests when using a thread sanitizer (TSan).
``set_nomemory()`` and ``call_with_nomemory()`` functions of the
:mod:`!_testcapi` extension are not thread safe. Patch by Victor Stinner.
Loading