New submission from Andreas Stührk <andy-pyt...@hammerhartes.de>: It's not possible (by intention) to instantiate a new instance of sys.flags. This is achieved by setting the "tp_new" slot to NULL (in `_PySys_Init()`), after `PyType_Ready()` is called, which means that a slot wrapper is added to the type dict for the "tp_new" slot (because the slot != NULL at that time). The problem is now that if one calls `sys.flags.__new__` directly, a null pointer dereference occurs in `tp_new_wrapper()`.
Attached is a patch that fixes the crash and adds a test. ---------- files: sys_flags__new__crash.patch keywords: patch messages: 145763 nosy: Trundle priority: normal severity: normal status: open title: sys.flags.__new__ crashes type: crash versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23431/sys_flags__new__crash.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13204> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com