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-117783: Immortalize objects that use deferred reference counting by colesbury · Pull Request #118112 · python/cpython Conversation
|
|
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 0cab82c 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| // run much later than typical leading to attribute errors due to | ||
| // partially cleared modules. To avoid this, we copy the module dict | ||
| // if it was immortalized. | ||
| PyObject *copy = PyDict_Copy(mod->md_dict); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we need to clear the original dict here too? Otherwise it seems like the immortal dict will just hang around and keep everything alive anyway?
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.
My intention was to keep the fields alive, but maybe that's not the best way to address this.
Basically, test_concurrent_futures.test_interpreter_shutdown was failing because a weakref was cleared later than usual, after the module dictionary was partially cleared. I was concerned that the problem might not be limited to that test, but I don't really have evidence for that one way or the other.
I'll get rid of this swapping and make the weakref callback more robust.
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.
LGTM!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.