STINNER Victor <vstin...@python.org> added the comment:

I can reproduce the crash using the following script.py:
---
import gc; gc.set_threshold(5)
import sys

old_modules = dict(sys.modules)
sys.modules.clear()
sys.modules.update(old_modules)

import _ast
import gc
gc.collect()
---

And the command:
---
./python -i < script.py
---

PyInit__ast() is called twice. That's surprising: builtin extension modules 
should only be initialized once.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41194>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to