Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-113190: Reenable non-debug interned string cleanup#113601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
encukou merged 19 commits intopython:mainfromeduardo-elizondo:reenable_unicode_clear_internedAug 15, 2024
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from13 commits
Commits
Show all changes
19 commits Select commitHold shift + click to select a range
666ca33 Reenable non-debug interned string cleanup through _PyUnicode_ClearIn…
eduardo-elizondo23d1aff Revert test changes due to previously leftover leaks
eduardo-elizondofd9c7ff Merge remote-tracking branch 'upstream/main' into reenable_unicode_cl…
eduardo-elizondoed09466 Add documentation
eduardo-elizondo2608119 Lint docs
eduardo-elizondo17e8817 Lint docs v2
eduardo-elizondodd1e8b4 Lint docs v3
eduardo-elizondoce5536b Lint docs v4
eduardo-elizondo071438f Lint docs v5
eduardo-elizondoafc7c1d Lint docs v6
eduardo-elizondo2ec1326 Lint docs v7
eduardo-elizondoe8b9b45 Lint docs v8
eduardo-elizondo175bc40 Lint docs v9
eduardo-elizondoffe9d03 Fix NEWS message
eduardo-elizondo085b93e Merge in the main branch
encukou080a853 Remove outdated comment
encukou8484c4b Merge remote-tracking branch 'upstream/main' into reenable_unicode_cl…
eduardo-elizondo6aee7f5 Addressed Comments
eduardo-elizondodc3b54f Update whatsnew
encukouFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
18 changes: 12 additions & 6 deletionsDoc/c-api/init.rst
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
11 changes: 11 additions & 0 deletionsDoc/whatsnew/3.13.rst
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
40 changes: 18 additions & 22 deletionsLib/test/_test_embed_structseq.py
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
20 changes: 20 additions & 0 deletionsMisc/NEWS.d/next/Core and Builtins/2024-01-15-18-11-48.gh-issue-113190.OwQX64.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| This updates the interned string deallocation function | ||
| ``_PyUnicode_ClearInterned`` to delete all interned strings during runtime | ||
| finalization when calling ``Py_Finalize``, regardless of their reference | ||
| count. | ||
| Worth noting that if an extension accidentally holds onto a interned string, | ||
| event after calling Py_Finalize, it will result in use-after-free error, | ||
eduardo-elizondo marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| leaving the user to a potential vulnerabilities. That said, the history of | ||
| how these interned strings are handled have been changing during throughout | ||
| different versions. | ||
| For example, in Python 3.9 and older, interned strings were never deleted. | ||
| Only special builds for Valgrind and Purity cleared them at exit. In Python | ||
| 3.10 and 3.11, interned strings are always deleted at exit. In Python 3.12, | ||
| interned strings are deleted only if Python is built in debug mode: they | ||
| are not deleted in release mode. In Python 3.13, interned strings will | ||
| now be all deleted. | ||
| Given how the guarantees changed throughout different versions, it is not | ||
| expected that users actively rely on this behavior for their extensions. | ||
12 changes: 0 additions & 12 deletionsObjects/unicodeobject.c
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
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.