]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mappin...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Jul 2026 14:51:38 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 14:51:38 +0000 (14:51 +0000)
commit707802f8d022342284e78dfe1851d4cef8269dec
tree664893f512eb562f745f7fd92c38e181497bc807
parent1ad838198a0ea8927bbd356afab32ee25fac9165
[3.15] gh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mapping (GH-154259) (GH-154262)

NetBSD mremap() returns a mapping whose grown region is not backed when
growing a shared anonymous mapping, so accessing it crashes.  Reject it
with ValueError, as is already done on Linux.
(cherry picked from commit 542b98293108a84fa5d904fb6dcf8bfb5080ec93)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Lib/test/test_mmap.py
Misc/NEWS.d/next/Library/2026-07-20-18-30-00.gh-issue-154258.mmapresize.rst [new file with mode: 0644]
Modules/mmapmodule.c