https://github.com/python/cpython/commit/b3319fe42fa7360ea07ec03c91421a9088077631
commit: b3319fe42fa7360ea07ec03c91421a9088077631
branch: main
author: Victor Stinner <vstin...@python.org>
committer: vstinner <vstin...@python.org>
date: 2025-03-24T15:33:56+01:00
summary:

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.

files:
M Lib/test/mapping_tests.py
M Lib/test/test_functools.py

diff --git a/Lib/test/mapping_tests.py b/Lib/test/mapping_tests.py
index 1a0caa00fcd49e..9d38da5a86ee5a 100644
--- a/Lib/test/mapping_tests.py
+++ b/Lib/test/mapping_tests.py
@@ -624,6 +624,7 @@ def __repr__(self):
 
     @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 fe096fa075865f..0bbfcfd0369cf3 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -2078,7 +2078,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_if_sanitizer("requires deep stack", ub=True, thread=True)
     @support.skip_emscripten_stack_overflow()
     def test_lru_recursion(self):
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to