gh-111178: Skip tests which require deep stack if UBsan (#131669)

If Python is built with Undefined Behavior sanitizer, skip
test_repr_deep() of test_userdict and test_lru_recursion() of
test_functools.
This commit is contained in:
Victor Stinner 2025-03-24 15:33:56 +01:00 committed by GitHub
parent 6226edc48b
commit b3319fe42f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -624,6 +624,7 @@ class TestHashMappingProtocol(TestMappingProtocol):
@support.skip_wasi_stack_overflow()
@support.skip_emscripten_stack_overflow()
@support.skip_if_sanitizer("requires deep stack", ub=True)
def test_repr_deep(self):
d = self._empty_mapping()
for i in range(support.exceeds_recursion_limit()):

View file

@ -2078,7 +2078,7 @@ class TestLRU:
@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_if_sanitizer("requires deep stack", ub=True, thread=True)
@support.skip_emscripten_stack_overflow()
def test_lru_recursion(self):