[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-15 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-15 Thread Eric Snow
Changes by Eric Snow : -- pull_requests: +3597 ___ Python tracker ___ ___

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-14 Thread Eric Snow
Eric Snow added the comment: New changeset 93c92f7d1dbb6e7e472f1d0444c6968858113de2 by Eric Snow in branch 'master': bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565) https://github.com/python/cpython/commit/93c92f7d1dbb6e7e472f1d0444c6968858113de2 --

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-14 Thread Eric Snow
Changes by Eric Snow : -- keywords: +patch pull_requests: +3554 stage: -> patch review ___ Python tracker ___

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-12 Thread Nick Coghlan
Nick Coghlan added the comment: Introducing sys.__modules__ doesn't solve the problem, since you'd be able to recreate the problems Oren reports just by messing with that as well as with sys.modules. And we try reasonable hard to protect users from completely breaking the interpreter just by

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-12 Thread Eric Snow
Eric Snow added the comment: > I haven't finished reviewing PR 1638. I'm not sure that this change > is worth. It breaks a code that assumes that sys.module is a dict, > and I afraid it slows down importing. Maybe revert this change until > resolving all problems? Yeah, I'm leaning that way

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I haven't finished reviewing PR 1638. I'm not sure that this change is worth. It breaks a code that assumes that sys.module is a dict, and I afraid it slows down importing. Maybe revert this change until resolving all problems? --

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-11 Thread Eric Snow
Eric Snow added the comment: This is pretty messy. :( Ideally we would disallow setting sys.modules to anything except a dict (or perhaps any mapping). However, we don't have that option currently (see https://github.com/ericsnowcurrently/cpython/tree/sys-module). In the meantime we have

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-11 Thread Eric Snow
Eric Snow added the comment: I'm looking into this. -- assignee: -> eric.snow ___ Python tracker ___ ___

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +eric.snow, serhiy.storchaka ___ Python tracker ___

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-09 Thread Oren Milman
New submission from Oren Milman: at least on my Windows, the following code: import sys sys.modules = [] - when run interactively, causes weird behavior, e.g. exit() doesn't exit the interpreter, and print() doesn't print. then, pressing Ctrl+C causes 'Assertion failed: !PyErr_Occurred(),