FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-158451: Fix python-gdb.py for invalid Unicode strings (GH-158475) by miss-islington · Pull Request #158495 · python/cpython · GitHub

Repository navigation

[3.14] gh-158451: Fix python-gdb.py for invalid Unicode strings (GH-158475) - #158495

Merged
vstinner merged 1 commit into
python:3.14from
miss-islington:backport-7eada7c-3.14
Sep 30, 2026
Merged

vstinner merged 1 commit into
python:3.14from
miss-islington:backport-7eada7c-3.14

Conversation

miss-islington commented Sep 30, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

python-gdb.py is now able to format an invalid Unicode string:
render invalid characters as "\Uhhhhhhhh" instead of raising an
exception.

The PyUnicodeWriter API fills a UCS-4 buffer with 0xff byte pattern
to detect usage of uninitialized characters. It produces invalid
characters '\Uffffffff'.

PyBytesObjectPtr now iterates on bytes (list of integers), instead of
creating a temporary Unicode string. Add more bytes tests in test_gdb
pretty printer.

Remove the unused 'ch2' variable.
(cherry picked from commit 7eada7c)

Co-authored-by: Victor Stinner vstinner@python.org

…nGH-158475)

python-gdb.py is now able to format an invalid Unicode string:
render invalid characters as "\Uhhhhhhhh" instead of raising an
exception.

The PyUnicodeWriter API fills a UCS-4 buffer with 0xff byte pattern
to detect usage of uninitialized characters. It produces invalid
characters '\Uffffffff'.

PyBytesObjectPtr now iterates on bytes (list of integers), instead of
creating a temporary Unicode string. Add more bytes tests in test_gdb
pretty printer.

Remove the unused 'ch2' variable.
(cherry picked from commit 7eada7c)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner enabled auto-merge (squash) September 30, 2026 12:14
vstinner merged commit 13b1a4b into python:3.14 Sep 30, 2026
50 checks passed
miss-islington deleted the backport-7eada7c-3.14 branch September 30, 2026 12:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL