Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
gh-145202: Fix crash in unicodedata's GraphemeBreakIterator and Segment#145216
Merged
serhiy-storchaka merged 2 commits intopython:mainfromFeb 26, 2026
Merged
Conversation
… SegmentRemove the tp_clear slots and make Segment members read-only.
Uh oh!
There was an error while loading.Please reload this page.
sergey-miryanov approved these changesFeb 25, 2026
Contributor
sergey-miryanov left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, small nitpick.
MemberAuthor
serhiy-storchaka commentedFeb 25, 2026
It is difficult to implement the absence of something. There are other GC classes that do not implement tp_clear. They will also crash if we add tp_clear without updating tp_dealloc. I added tests to ensure that these classes work with the garbage collector. |
colesbury approved these changesFeb 25, 2026
812ef66 intopython:main 49 checks passed
Uh oh!
There was an error while loading.Please reload this page.
bkap123 pushed a commit to bkap123/cpython that referenced this pull requestFeb 28, 2026
… Segment (pythonGH-145216)Remove the tp_clear slots and make Segment members read-only.Also add tests for reference loops involving GraphemeBreakIteratorand Segment.
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 freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
Remove the tp_clear slots and make Segment members read-only.
unicodedata.iter_graphemeson a free threaded build #145202