Skip to content

Commit 5956576

Browse files
committed
Update test case
1 parent c751d7a commit 5956576

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Lib/test/test_io/test_bufferedio.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,15 @@ def test_bad_readinto_type(self):
624624
self.assertIsInstance(cm.exception.__cause__, TypeError)
625625

626626
def test_read1_error_does_not_cause_reentrant_failure(self):
627+
# 32-bit builds (e.g. win32) can raise OverflowError
628+
# converting huge Python int to Py_ssize_t.
629+
if sys.maxsize <= 2**32:
630+
self.skipTest("requires 64-bit build")
631+
# Under TSan, the process may abort on huge allocation
632+
# attempts (exit code 66).
633+
if support.check_sanitizer(thread=True):
634+
self.skipTest("TSan aborts on huge allocations")
635+
627636
self.addCleanup(os_helper.unlink, os_helper.TESTFN)
628637
with self.open(os_helper.TESTFN, "wb") as f:
629638
f.write(b"hello")

0 commit comments

Comments
 (0)