cpython/Lib/test/test_io
zhong 6d54b6ac7d
gh-143378: Fix use-after-free when BytesIO is concurrently mutated during write operations (GH-143408)
PyObject_GetBuffer() can execute user code (e.g. via __buffer__), which may
close or otherwise mutate a BytesIO object while write() or writelines()
is in progress. This could invalidate the internal buffer and lead to a
use-after-free.

Ensure that PyObject_GetBuffer() is called before validation checks.
2026-01-09 13:50:56 +02:00
..
__init__.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
__main__.py
test_bufferedio.py gh-129005: Remove copies from _pyio using take_bytes (#141539) 2025-11-18 10:10:32 +01:00
test_file.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
test_fileio.py gh-69528: Distinguish between file modes "wb+" and "rb+" (GH-137834) 2025-10-21 20:33:30 +03:00
test_general.py gh-60107: Remove a copy from RawIOBase.read (#141532) 2025-11-20 17:37:04 +00:00
test_largefile.py gh-129005: Remove copies from _pyio using take_bytes (#141539) 2025-11-18 10:10:32 +01:00
test_memoryio.py gh-143378: Fix use-after-free when BytesIO is concurrently mutated during write operations (GH-143408) 2026-01-09 13:50:56 +02:00
test_signals.py gh-138013: Split SignalsTest from test_io.test_general (#139079) 2025-09-19 18:21:50 +00:00
test_textio.py gh-142594: fix by property calls io.TextIOWrapper.detach (GH-142706) 2025-12-15 15:13:58 +01:00
test_univnewlines.py gh-138013: Move I/O tests to test_io (#138365) 2025-09-03 11:37:06 +02:00
utils.py gh-138013: Move I/O test infrastructre to test_io.utils (#138475) 2025-09-11 12:45:30 +02:00