]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40915: Fix mmap resize bugs on Windows (GH-29213)
authorTim Golden <mail@timgolden.me.uk>
Tue, 26 Oct 2021 21:56:43 +0000 (22:56 +0100)
committerGitHub <noreply@github.com>
Tue, 26 Oct 2021 21:56:43 +0000 (22:56 +0100)
commitaea5ecc458084e01534ea6a11f4181f369869082
tree165b9e684302c6ce45884969a7cb1019a658f623
parentb5ee79494b2e0d484b7cf59f6746010e22567702
bpo-40915: Fix mmap resize bugs on Windows (GH-29213)

(original patch by eryksun)

Correctly hand various failure modes when resizing an mmap on Windows:

* Resizing a pagefile-backed mmap now creates a new mmap and copies data
* Attempting to resize when another mapping is held on the same file raises an OSError
* Attempting to resize a nametagged mmap raises an OSError if another mapping is held with the same nametag
Doc/library/mmap.rst
Lib/test/test_mmap.py
Modules/mmapmodule.c