Skip to content

Commit

Permalink
pythongh-117657: Skip tests that may cause stack overflows under TSan (
Browse files Browse the repository at this point in the history
…python#129751)

These tests crash under TSan due to stack overflows. Just skip them if
TSan is enabled.
  • Loading branch information
colesbury authored and srinivasreddy committed Feb 7, 2025
1 parent 9411590 commit 60c6767
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/test_call.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
set_recursion_limit, skip_on_s390x, skip_emscripten_stack_overflow, import_helper)
set_recursion_limit, skip_on_s390x, skip_emscripten_stack_overflow,
skip_if_sanitizer, import_helper)
try:
import _testcapi
except ImportError:
Expand Down Expand Up @@ -1036,6 +1037,7 @@ class TestRecursion(unittest.TestCase):

@skip_on_s390x
@unittest.skipIf(is_wasi and Py_DEBUG, "requires deep stack")
@skip_if_sanitizer("requires deep stack", thread=True)
@unittest.skipIf(_testcapi is None, "requires _testcapi")
@skip_emscripten_stack_overflow()
def test_super_deep(self):
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_functools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2067,6 +2067,7 @@ def orig(a, /, b, c=True): ...

@support.skip_on_s390x
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
@support.skip_if_sanitizer("requires deep stack", thread=True)
@support.skip_emscripten_stack_overflow()
def test_lru_recursion(self):

Expand Down

0 comments on commit 60c6767

Please sign in to comment.