| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Destructors can run after finalization has cleared the interpreter's lazy_modules set and lazy_pending_submodules dict. Declaring or resolving a lazy import from one of them passed NULL to PySet_Add(), PySet_Discard() or the pending-submodules lookup. Treat the bookkeeping as a no-op once the state is gone, as the other readers of this state already do.
|
Addressed comments in new commit |
Sorry, something went wrong.
|
Thanks @brittanyrey for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
Sorry, something went wrong.
|
GH-159062 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
…s at shutdown (GH-158821) (#159062) gh-158820: Add null checks to avoid segfaults with lazy imports at shutdown (GH-158821) Destructors can run after finalization has cleared the interpreter's lazy_modules set and lazy_pending_submodules dict. Declaring or resolving a lazy import from one of them passed NULL to PySet_Add(), PySet_Discard() or the pending-submodules lookup. Treat the bookkeeping as a no-op once the state is gone, as the other readers of this state already do. (cherry picked from commit a6e6361) Co-authored-by: Brittany Reynoso <breynoso@meta.com>
| Back | FazBrowse Home | New Git URL |
Additional finalizers can run after finalize_modules() has cleared the interpreter's lazy_modules set and lazy_pending_submodules dict. In the perfect storm, this can lead to a seg fault when accessing either container without checking if the object is still allocated.