GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — gh-125286: Share the Main Refchain With Legacy Interpreters by ericsnowcurrently · Pull Request #125709 · python/cpython Conversation
|
|
Rather than open-code the Py_RTFLAGS_USE_MAIN_OBMALLOC flag test in multiple places, I think a helper function is better, something like: I was working on a similar patch but my approach was to copy the REFCHAIN pointer, e.g. Is |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
+1 I'll do that.
I'm unclear on how that's different from what I've done.
I left it for the sake of the sanity check. Given the lingering pain in this area, especially related to immortal objects, I figured it might not hurt to preserve such checks.
Thanks! Sorry if we ended up duplicating effort. I should have checked with you first. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think it's a bit less code and would be a bit faster, since you can just use
Hmm, I think it's a bit confusing to leave it since it really shouldn't be doing anything useful. Or, is there a reason we think it might do something? The second part of the function shouldn't do anything. If
Your code runs without crashing, which is a plus. ;-) I'm glad you made a PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oh, I missed this part of your code change: That explains why you're unclear how my code is different. But if you do this in the init, I don't think the check for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Good point. I'll remove the superfluous calls. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also, you're right about |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I realized the problem with dropping all the extra
At step (3) we rely on the feature flags being set, but we don't set them until step (5). Fixing this is a bit messy and may be too much to backport, so I'd like to merge this fix with the various |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reverts commit 3421a19.
|
It wasn't as bad as I thought, so I believe I've got things in a good place here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
!buildbot AMD64 Arch Linux TraceRefs |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 7ab086c 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think this change should have a What's New entry, which in turn needs documentation for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm fine with that. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
!buildbot AMD64 Arch Linux TraceRefs |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @ericsnowcurrently for commit 1360d86 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
One more doc fix in a place where I couldn't add a GitHub suggestion. I hope you don't mind me pushing this directly to the PR. The |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thank you @nascheme & @ericsnowcurrently!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@nascheme, this should be backported to 3.13 (and 3.12), right? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
For 3.12, this fix applies on top of GH-125205, which is not yet merged. For 3.13, GH-125204 is also not yet merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ers (pythongh-125709) They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds.
…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]>
…ers (pythongh-125709) They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds.
…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]>
…thongh-125709) They used to be shared, before 3.12. Returning to sharing them resolves a failure on Py_TRACE_REFS builds. Co-authored-by: Petr Viktorin <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.