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 — PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c · Issue #151847 · python/cpython

PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c #151847

New issue
Copy link
New issue
Copy link
Open
Open
PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c#151847
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@aisk
aisk
opened on Jun 21, 2026
Issue body actions

Bug report

Bug description:

Original gist: https://gist.github.com/devdanzin/577421b083bad6802aa391b909d1a725

unicode_format_arg_parse (line 563): -PY_SSIZE_T_MIN is undefined behavior in C. Benign on two's-complement but technically UB. bytesobjects.c have the same problem.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-151847: Avoid undefined behaviour negating PY_SSIZE_T_MIN width in str/bytes formatting #151849

Activity

  1. aisk
    added a parent issue on Jun 21, 2026
    • Umbrella issue: bugs found using cpython-review-toolkit #146102
  2. aisk
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 21, 2026
  3. picnixz
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Jun 21, 2026
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

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-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.