|
10 | 10 | from collections import deque, UserList |
11 | 11 | from itertools import cycle, count |
12 | 12 | from test import support |
| 13 | +from test.support import check_sanitizer |
13 | 14 | from test.support import os_helper, threading_helper |
14 | 15 | from .utils import byteslike, CTestCase, PyTestCase |
15 | 16 |
|
@@ -623,16 +624,10 @@ def test_bad_readinto_type(self): |
623 | 624 | bufio.readline() |
624 | 625 | self.assertIsInstance(cm.exception.__cause__, TypeError) |
625 | 626 |
|
| 627 | + @unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform') |
| 628 | + @unittest.skipIf(check_sanitizer(thread=True), |
| 629 | + 'ThreadSanitizer aborts on huge allocations (exit code 66).') |
626 | 630 | 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 | | - |
636 | 631 | self.addCleanup(os_helper.unlink, os_helper.TESTFN) |
637 | 632 | with self.open(os_helper.TESTFN, "wb") as f: |
638 | 633 | f.write(b"hello") |
|
0 commit comments