Skip to content

[mypyc] Fix handling of invalid codepoint values in librt.strings#21634

Merged
JukkaL merged 1 commit into
masterfrom
librt-strings-out-of-range
Jun 22, 2026
Merged

[mypyc] Fix handling of invalid codepoint values in librt.strings#21634
JukkaL merged 1 commit into
masterfrom
librt-strings-out-of-range

Conversation

@JukkaL

@JukkaL JukkaL commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

isidentifier, tolower and toupper would terminate the process if passed a too high Unicode codepoint value. Fix so that all the is* functions return false for invalid codepoints and tolower/toupper functions return them unchanged.

I used coding agent assist.

`isidentifier`, `tolower` and `toupper` would terminate the process if
passed a too high Unicode codepoint value. Fix so that all the `is*`
functions return false for invalid codepoints and `tolower`/`toupper`
functions return them unchanged.
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 3179030 into master Jun 22, 2026
25 checks passed
@JukkaL JukkaL deleted the librt-strings-out-of-range branch June 22, 2026 18:06
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