Skip to content

Commit b3319fe

Browse files
authored
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.
1 parent 6226edc commit b3319fe

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: Lib/test/mapping_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ def __repr__(self):
624624

625625
@support.skip_wasi_stack_overflow()
626626
@support.skip_emscripten_stack_overflow()
627+
@support.skip_if_sanitizer("requires deep stack", ub=True)
627628
def test_repr_deep(self):
628629
d = self._empty_mapping()
629630
for i in range(support.exceeds_recursion_limit()):

Diff for: Lib/test/test_functools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ def orig(a, /, b, c=True): ...
20782078

20792079
@support.skip_on_s390x
20802080
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
2081-
@support.skip_if_sanitizer("requires deep stack", thread=True)
2081+
@support.skip_if_sanitizer("requires deep stack", ub=True, thread=True)
20822082
@support.skip_emscripten_stack_overflow()
20832083
def test_lru_recursion(self):
20842084

0 commit comments

Comments
 (0)