Meador Inge <[email protected]> added the comment: > 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 ---------- nosy: +meador.inge _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue9756> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
