New submission from Masaya Suzuki: Python 2.7.3 crushes when the following code is run without any library, which means run python with -S option:
class Test: pass unicode(Test()) In the course of the interpreter tries to find the "__unicode__" attribute in a class, it uses a cached python string of "__unicode__". The reason of this crush is that the cached value is used before initialized. It is initialized only when trying to find the one of a new-style class, so the interpreter will crush if one uses only classic classes. The attached patch will fix this issue by initializing a cached value before it is used. Thanks. ---------- components: Interpreter Core files: object_unicode.patch keywords: patch messages: 178811 nosy: draftcode priority: normal severity: normal status: open title: segmentation fault when unicode(classic_class_instance) type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28528/object_unicode.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16839> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com