GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mmap.resize() can raise SystemError · Issue #138205 · python/cpython

mmap.resize() can raise SystemError #138205

New issue
Copy link
New issue
Copy link
Closed
Closed
mmap.resize() can raise SystemError#138205
Copy link
Labels
3.15bugs and security fixesbugs 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

Description

@serhiy-storchaka
serhiy-storchaka
opened on Aug 27, 2025
Issue body actions

Bug report

On Posix platforms without mremap() (FreeBSD, OpenBSD, NetBSD, OpenIndiana) mmap.resize() raises SystemError.

SystemError: mmap: resizing not available--no mremap()

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

  • gh-138205: Remove the resize method on mmap object on platforms don't support it #138276
  • gh-138205: explicit mention to mmap.mmap.resize in "Porting to Python 3.15" notes #143440

Activity

  1. serhiy-storchaka
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    3.15bugs and security fixesbugs and security fixes
    on Aug 27, 2025
  2. YvesDup commented on Aug 27, 2025

    @YvesDup
    YvesDup
    on Aug 27, 2025
    Contributor
    More actions

    This also happens on MacOSX 15.1, M4 pro

  3. serhiy-storchaka commented on Aug 28, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Aug 28, 2025
    MemberAuthor
    More actions

    There was other improper use of SystemError in the mmap module: #7381.

  4. aisk commented on Aug 31, 2025

    @aisk
    aisk
    on Aug 31, 2025
    Member
    More actions

    I'd like to just remove the method on platforms which doesn't support it for consistent reasons, just like the madvise method is not exist on platforms which doesn't support it.

  5. kumaraditya303
    added a commit that references this issue on Sep 6, 2025

    gh-138205: Remove the `resize` method on `mmap` object on platforms d…

    c919d02
  6. serhiy-storchaka
    removed
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    on Sep 6, 2025
  7. serhiy-storchaka commented on Sep 6, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Sep 6, 2025
    MemberAuthor
    More actions

    Since this is a very old behavior, it is not worth to backport the change.

  8. serhiy-storchaka
    closed this as completedon Sep 6, 2025
  9. lkollar
    added a commit that references this issue on Sep 9, 2025

    pythongh-138205: Remove the `resize` method on `mmap` object on platf…

    5da862a
  10. picnixz
    added a commit that references this issue on Jan 5, 2026

    gh-138205: explicit mention to `mmap.mmap.resize` in "Porting to Pyth…

    1569275
  11. thunder-coding
    added a commit that references this issue on Feb 15, 2026

    pythongh-138205: explicit mention to `mmap.mmap.resize` in "Porting t…

    d51742e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15bugs and security fixesbugs 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.