Irit Katriel <iritkatr...@gmail.com> added the comment:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x000000010015fd26 python.exe`_PyObject_GenericGetAttrWithDict(obj=0x000000013feb7a50, name=0x0000000100fe9350, dict=0x0000000000000000, suppress=0) at object.c:1305:17 1302 PyDictValues **values_ptr = _PyObject_ValuesPointer(obj); 1303 if (values_ptr && *values_ptr) { 1304 if (PyUnicode_CheckExact(name)) { -> 1305 assert(*_PyObject_DictPointer(obj) == NULL); 1306 res = _PyObject_GetInstanceAttribute(obj, *values_ptr, name); 1307 if (res != NULL) { 1308 goto done; Target 0: (python.exe) stopped. (lldb) p obj (PyObject *) $0 = 0x000000013feb7a50 (lldb) p _PyObject_Dump((PyObject*)obj->ob_type) object address : 0x13ff25590 object refcount : 32 object type : 0x100518680 object type name: type object repr : <class '_cffi_backend.FFI'> (lldb) p (PyObject*)obj->ob_type (PyObject *) $1 = 0x000000013ff25590 (lldb) p (PyObject*)obj->ob_type->tp_dict (PyObject *) $2 = 0x000000013fedd910 (lldb) p _PyObject_Dump((PyObject*)obj->ob_type->tp_dict) object address : 0x13fedd910 object refcount : 1 object type : 0x100511d50 object type name: dict object repr : {'__new__': <built-in method __new__ of type object at 0x13ff25590>, '__getattribute__': <slot wrapper '__getattribute__' of '_cffi_backend.FFI' objects>, '__init__': <slot wrapper '__init__' of '_cffi_backend.FFI' objects>, 'addressof': <method 'addressof' of '_cffi_backend.FFI' objects>, 'alignof': <method 'alignof' of '_cffi_backend.FFI' objects>, 'def_extern': <method 'def_extern' of '_cffi_backend.FFI' objects>, 'callback': <method 'callback' of '_cffi_backend.FFI' objects>, 'cast': <method 'cast' of '_cffi_backend.FFI' objects>, 'dlclose': <method 'dlclose' of '_cffi_backend.FFI' objects>, 'dlopen': <method 'dlopen' of '_cffi_backend.FFI' objects>, 'from_buffer': <method 'from_buffer' of '_cffi_backend.FFI' objects>, 'from_handle': <method 'from_handle' of '_cffi_backend.FFI' objects>, 'gc': <method 'gc' of '_cffi_backend.FFI' objects>, 'getctype': <method 'getctype' of '_cffi_backend.FFI' objects>, 'init_once': <method 'init_once' of '_cffi_backend.FFI' objec ts>, 'integer_const': <method 'integer_const' of '_cffi_backend.FFI' objects>, 'list_types': <method 'list_types' of '_cffi_backend.FFI' objects>, 'memmove': <method 'memmove' of '_cffi_backend.FFI' objects>, 'new': <method 'new' of '_cffi_backend.FFI' objects>, 'new_allocator': <method 'new_allocator' of '_cffi_backend.FFI' objects>, 'new_handle': <method 'new_handle' of '_cffi_backend.FFI' objects>, 'offsetof': <method 'offsetof' of '_cffi_backend.FFI' objects>, 'release': <method 'release' of '_cffi_backend.FFI' objects>, 'sizeof': <method 'sizeof' of '_cffi_backend.FFI' objects>, 'string': <method 'string' of '_cffi_backend.FFI' objects>, 'typeof': <method 'typeof' of '_cffi_backend.FFI' objects>, 'unpack': <method 'unpack' of '_cffi_backend.FFI' objects>, 'errno': <attribute 'errno' of '_cffi_backend.FFI' objects>, '__doc__': None, 'NULL': <cdata 'void *' NULL>, 'error': <class 'ffi.error'>, 'CType': <class '_cffi_backend.CType'>, 'CData': <class '_cffi_backend._CDataBase'>, 'b uffer': <class '_cffi_backend.buffer'>, 'RTLD_LAZY': 1, 'RTLD_NOW': 2, 'RTLD_GLOBAL': 8, 'RTLD_LOCAL': 4, 'RTLD_NODELETE': 128, 'RTLD_NOLOAD': 16} (lldb) p (PyObject*)obj->ob_type->tp_dictoffset (PyObject *) $3 = NULL Because the tp_dictoffset is 0, _PyObject_DictPointer(obj) returns NULL and in the assertion, where the return value is dereferenced, it crashes. (Note: it's not that the assertion is failing, we don't get that far). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45941> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com