[Python-ideas] sys.py

Eric Snow ericsnowcurrently at gmail.com
Thu Sep 14 19:54:48 EDT 2017


On Thu, Sep 14, 2017 at 4:26 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> How do you crash Python?

See https://bugs.python.org/issue31404.

> Can't we fix the interpreter?

I'm looking into it.  In the meantime I've split the original branch
up into 3.  The first I've already landed. [1]  The second I'll land
once I resolve some refcount leaks. [2]  The final branch is the one
that actually drops PyInterpreterState.modules. [3]  It's quite small,
but that's the part that causes the crash.  So we'll have to adapt it
if we want to make it work before it can be merged again (or else
we'll be right back where we were before I reverted).

> Your change makes so I would prefer to keep it if possible.

Why in particular do you want to keep the change?

-eric


[1] https://github.com/python/cpython/pull/3575
[2] https://github.com/python/cpython/pull/3593
[3] https://github.com/ericsnowcurrently/cpython/compare/sys-modules-any-mapping...ericsnowcurrently:remove-modules-from-interpreter-state


More information about the Python-ideas mailing list