Uh oh!
There was an error while loading. Please reload this page.
bpo-47182: Fix crash by named unicode characters after interpreter reinitialization - #32212
Conversation
vstinner
left a comment
There was a problem hiding this comment.
LGTM, but consider adding a comment ;-)
If you are motivated, you can add a test to test_embed using test_repeated_init_exec: see test_finalize_structseq() of test_embed for example. You can run arbitrary Python code, it's executed multiple times, each time the interpreter is created/destroyed in the same process.
Uh oh!
There was an error while loading. Please reload this page.
tiran
commented
Mar 31, 2022
I have added a comment and a test case. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM, thanks for adding a regression test!
Uh oh!
There was an error while loading. Please reload this page.
miss-islington
commented
Mar 31, 2022
@tiran: Status check is done, and it's a success ✅ . |
miss-islington
commented
Mar 31, 2022
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8, 3.9, 3.10. |
miss-islington
commented
Mar 31, 2022
Sorry, @tiran, I could not cleanly backport this to |
miss-islington
commented
Mar 31, 2022
Sorry @tiran, I had trouble checking out the |
miss-islington
commented
Mar 31, 2022
Sorry, @tiran, I could not cleanly backport this to |
miss-islington
commented
Mar 31, 2022
Sorry @tiran, I had trouble checking out the |
vstinner
commented
Mar 31, 2022
Are you sure that Python 3.10 and older are affected? Clearing interned strings is new in Python 3.10. Python 3.11 changed that with immortal code objects and immortal strings. In Python 3.9, strings were not really cleared by Py_Finalize(). They just leaked. |
…eter reinitialization (pythonGH-32212) Automerge-Triggered-By: GH:tiran. (cherry picked from commit 44e9150) Co-authored-by: Christian Heimes <christian@python.org>
…ter reinitialization (pythonGH-32212) Automerge-Triggered-By: GH:tiran. (cherry picked from commit 44e9150) Co-authored-by: Christian Heimes <christian@python.org>
bedevere-bot
commented
Mar 31, 2022
GH-32216 is a backport of this pull request to the 3.10 branch. |
bedevere-bot
commented
Mar 31, 2022
GH-32217 is a backport of this pull request to the 3.9 branch. |
tiran
commented
Mar 31, 2022
3.9 and earlier are definitely not affected. It doesn't hurt to backport the change to 3.10. |
vstinner
commented
Mar 31, 2022
Yeah, I agree to backport to 3.10. But you have to backport manually, _testembed doesn't have test_repeated_init_exec. |
https://bugs.python.org/issue47182
Automerge-Triggered-By: GH:tiran