From b3319fe42fa7360ea07ec03c91421a9088077631 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 24 Mar 2025 15:33:56 +0100 Subject: [PATCH] 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. --- Lib/test/mapping_tests.py | 1 + Lib/test/test_functools.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/mapping_tests.py b/Lib/test/mapping_tests.py index 1a0caa00fcd..9d38da5a86e 100644 --- a/Lib/test/mapping_tests.py +++ b/Lib/test/mapping_tests.py @@ -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()): diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index fe096fa0758..0bbfcfd0369 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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):