-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
mmap.resize() can raise SystemError #138205
Copy link
Copy link
Closed
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
On Posix platforms without mremap() (FreeBSD, OpenBSD, NetBSD, OpenIndiana)
mmap.resize()raises SystemError.SystemError should only be raised in case of the misuse of the C API or breaking internal consistency of the Python core. It is one step away from a segmentation fault or undefined behavior. If some function cannot be implemented, it should either do not exist (causing AttributeError) or raise more appropriate exception when called, like NotImplemenedError, or OSError(ENOTSUP), or simply RuntimeError.
Linked PRs
mmap.mmap.resizein "Porting to Python 3.15" notes #143440