[New-bugs-announce] [issue16839] segmentation fault when unicode(classic_class_instance)
report at bugs.python.org
Wed Jan 2 14:50:36 CET 2013
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:
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.
components: Interpreter Core
title: segmentation fault when unicode(classic_class_instance)
versions: Python 2.7
Added file: http://bugs.python.org/file28528/object_unicode.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce