Jan Safranek added the comment:

> Could you try to inspect the `self` variable inside weakref_dealloc,
> especially `self->wr_object` and its Py_TYPE() value? Also, what is the
> value of Py_REFCNT(self->wr_object)?

in weakref_dealloc at Objects/weakrefobject.c:106:

(gdb) p *self
$1 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x7fdb8ffc91a0 
<_PyWeakref_RefType>}

(gdb) p *((PyWeakReference*)self)
$7 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x7fdb8ffc91a0 
<_PyWeakref_RefType>, wr_object = 0x7fdb9c30bc00 <swigpyobject_type.9541>, 
wr_callback = 0x0, hash = -1, 
  wr_prev = 0x0, wr_next = 0x0}

(gdb) p *((PyWeakReference*)self)->wr_object
$9 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x0}

If I am reading Py_TYPE right, Py_TYPE(self->wr_object) must be 0 (=NULL).

<swigpyobject_type.9541> seems to be PyTypeObject generated by SWIG in 
cmpi-bindings, I'll dig into it. Please let me know if there is anything 
suspicious or worth checking.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to