]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mapping ...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 20 Jul 2026 14:06:19 +0000 (17:06 +0300)
committerGitHub <noreply@github.com>
Mon, 20 Jul 2026 14:06:19 +0000 (14:06 +0000)
commit542b98293108a84fa5d904fb6dcf8bfb5080ec93
tree24239ab2f1fd692e40971620fc002ea00b54fe20
parent85ab1125f47a05ae3c43bee917e086761784ad4d
gh-154258: Fix mmap.resize() crash on NetBSD growing a shared anonymous mapping (GH-154259)

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.

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