Title: PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c · Issue #151847 · python/cpython · GitHub
Open Graph Title: PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c · Issue #151847 · python/cpython
X Title: PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c · Issue #151847 · python/cpython
Description: 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....
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/python/cpython/issues/151847
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PY_SSIZE_T_MIN negate UB in unicode_format.c and bytesobject.c","articleBody":"# Bug report\n\n### Bug description:\n\nOriginal gist: https://gist.github.com/devdanzin/577421b083bad6802aa391b909d1a725\n\n`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.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-151849\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/aisk","@type":"Person","name":"aisk"},"datePublished":"2026-06-21T14:15:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/151847/cpython/issues/151847"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:31882bc9-9b5c-c836-9966-6be4dbcb61b0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E8A:4FAAE:5B38963:8053E01:6A50C9C7 |
| html-safe-nonce | d892d1e3398086574343825fd6f4e5b728784ab55ea1d3aecc07a186ba1c2796 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RThBOjRGQUFFOjVCMzg5NjM6ODA1M0UwMTo2QTUwQzlDNyIsInZpc2l0b3JfaWQiOiIzNDE5OTk1NzU3MDgzNjc1MDc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 433d544b22df25bff4026558c0438334da382d1b29a7043c06a47049dd99a586 |
| hovercard-subject-tag | issue:4710777092 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/151847/issue_layout |
| twitter:image | https://opengraph.githubassets.com/325ab2a8bee316e796a12835615c3350c23f6a5c6df5eef46863fcff20bb66b7/python/cpython/issues/151847 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/325ab2a8bee316e796a12835615c3350c23f6a5c6df5eef46863fcff20bb66b7/python/cpython/issues/151847 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aisk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width