Message115671
> To fix the segfault, I suppose that we use a more strict validation on
> the input type. Eg. Use PyUnicode_Check() instead of
> PyObject_IsInstance()?
Where would the more strict validation take place? This problem is not unique to Unicode objects:
motherbrain:py3k minge$ ./python.exe
Python 3.2a2 (py3k:84541, Sep 5 2010, 15:11:19)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class MyClass(object):
... def __init__(self):
... self.pwn = None
... def __getattribute__(self, name):
... return getattr(187, name)
...
[49633 refs]
>>> instance = MyClass()
[49640 refs]
>>> int.bit_length(instance)
Assertion failed: (PyLong_Check(v)), function long_bit_length, file Objects/longobject.c, line 4397.
Abort trap |
|
Date |
User |
Action |
Args |
2010-09-05 20:36:39 | meador.inge | set | recipients:
+ meador.inge, vstinner, Trundle, flox |
2010-09-05 20:36:39 | meador.inge | set | messageid: <1283718999.43.0.278522453453.issue9756@psf.upfronthosting.co.za> |
2010-09-05 20:36:37 | meador.inge | link | issue9756 messages |
2010-09-05 20:36:37 | meador.inge | create | |
|