-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-116510: Fix crash due to shared immortal interned strings. #124646
Conversation
Thanks @nascheme for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…ythongh-124646) (cherry picked from commit 98b2ed7) Co-authored-by: Neil Schemenauer <[email protected]>
GH-124648 is a backport of this pull request to the 3.13 branch. |
|
@freakboy3742: It might be a good idea to skip this test on iOS for the same reason as WASM: "The platform starts and stops background threads that use fds". I haven't seen this failure on Android yet, but I did have to skip a similar one in |
…rned strings. (pythongh-124646)" This reverts commit dc09a0c.
The pythongh-124646 fix has the issue that it breaks the trace-refs debug build. This is a simpler fix that avoids the use-after-free crashes by just leaking immortal interned strings allocated by legacy subinterpreters.
The pythonGH-124646 fix has the issue that it breaks the trace-refs debug build. This is a simpler fix that avoids the use-after-free crashes by just leaking immortal interned strings allocated by legacy subinterpreters.
…rings. (pythongh-124646)" This reverts commit 98b2ed7.
…ortal interned strings (pythongh-124646)" (pythongh-124807) Revert "pythongh-116510: Fix crash due to shared immortal interned strings. (pythongh-124646)" This reverts commit 98b2ed7. (cherry picked from commit 7bdfabe) Co-authored-by: T. Wouters <[email protected]>
… interned strings (gh-124646)" (gh-124807) (#124812) gh-124785: Revert "gh-116510: Fix crash due to shared immortal interned strings (gh-124646)" (gh-124807) Revert "gh-116510: Fix crash due to shared immortal interned strings. (gh-124646)" This reverts commit 98b2ed7. (cherry picked from commit 7bdfabe) Co-authored-by: T. Wouters <[email protected]>
…red immortal interned strings (pythongh-124646)" (pythongh-124807) Revert "pythongh-116510: Fix crash due to shared immortal interned strings. (pythongh-124646)" This reverts commit 98b2ed7. (cherry picked from commit 7bdfabe) Co-authored-by: T. Wouters <[email protected]>
…ared immortal interned strings (pythongh-124646)" (pythongh-124807)" This reverts commit 7bdfabe.
…4865) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS failures identified by gh-124785.
…ythongh-124865) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of pythongh-124646 that then addresses the Py_TRACE_REFS failures identified by pythongh-124785. (cherry picked from commit f2cb399) Co-authored-by: Eric Snow <[email protected]>
…ythongh-124865) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of pythongh-124646 that then addresses the Py_TRACE_REFS failures identified by pythongh-124785. (cherry picked from commit f2cb399) Co-authored-by: Eric Snow <[email protected]>
…gh-124865) (gh-125709) (GH-125204) * gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS failures identified by gh-124785. (cherry picked from commit f2cb399) Co-authored-by: Eric Snow <[email protected]> * [3.13] gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709) They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds. --------- Co-authored-by: Eric Snow <[email protected]>
…gh-125205) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS failures identified by gh-124785 (i.e. backporting gh-125709 too). (cherry picked from commit f2cb399, AKA gh-124865) Co-authored-by: Eric Snow <[email protected]>
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.