File: meld3/cmeld3.c
Function: contenthandler
Error: ob_refcnt of heap-region-6 is 1 too low
313 static PyObject*
314 contenthandler(PyObject *self, PyObject *args) {
315     PyObject *node, *text, *structure;
316 	
317     if (!PyArg_ParseTuple(args, "OOO:content", &node, &text, &structure)) {
when PyArg_ParseTuple() succeeds
taking False path
318 	return NULL;
319     }
320     PyObject *replacel = NULL;
321     PyObject *replace = NULL;
322     PyObject *replacenode  = NULL;
323     PyObject *newchildren  = NULL;
324     PyObject *newdict  = NULL;
325     PyObject *klass  = NULL;
326 
327     if (!(klass = PyObject_GetAttr(node, PySTR__class__))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
328     if (!(replacel = PyObject_GetAttr(node, PySTRReplace))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:9 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
329     if (!(replace = PyList_GetItem(replacel, 0))) return NULL;
taking False path
330     Py_DECREF(replacel);
when taking True path
331 
332     PyObject_SetAttr(node, PySTRtext, Py_None);
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyObject_SetAttr() succeeds
333 
334     if (!(newdict = PyDict_New())) return NULL;
when PyDict_New() succeeds
taking False path
335 
336     if (PyDict_SetItem(newdict, PySTRparent, node) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when PyDict_SetItem() succeeds
taking False path
337     if (PyDict_SetItem(newdict, PySTRattrib, emptyattrs) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
heap-region-6 is now referenced by 1 non-stack value(s): emptyattrs
ob_refcnt is now refs: 0 + N where N >= 2
338     if (PyDict_SetItem(newdict, PySTRtext, text) == -1) return NULL;
when PyDict_SetItem() succeeds
taking False path
339     if (PyDict_SetItem(newdict, PySTRstructure, structure) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
340     if (PyDict_SetItem(newdict, PySTRtag, replace) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
341     if (PyDict_SetItem(newdict, PySTR_children, emptychildren) == -1) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
342 	return NULL;
343     }
344     if (!(replacenode = PyInstance_NewRaw(klass, newdict))) return NULL;
when PyInstance_NewRaw() succeeds
taking False path
345     Py_DECREF(klass);
when taking False path
calling tp_dealloc on new ref from call to PyObject_GetAttr allocated at meld3/cmeld3.c:327
346     Py_DECREF(newdict);
when taking True path
347 
348     if (!(newchildren = PyList_New(1))) return NULL;
when PyList_New() succeeds
taking False path
349     PyList_SET_ITEM(newchildren, 0, replacenode);  // steals a reference to rn
350     PyObject_SetAttr(node, PySTR_children, newchildren);
when PyObject_SetAttr() succeeds
351     Py_DECREF(newchildren);
when taking True path
352     Py_INCREF(Py_None);
353     return Py_None;
354     
355 }
ob_refcnt of heap-region-6 is 1 too low
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: emptyattrs
but final ob_refcnt is N + 0
found 14 similar trace(s) to this

File: meld3/cmeld3.c
Function: contenthandler
Error: ob_refcnt of heap-region-10 is 1 too low
313 static PyObject*
314 contenthandler(PyObject *self, PyObject *args) {
315     PyObject *node, *text, *structure;
316 	
317     if (!PyArg_ParseTuple(args, "OOO:content", &node, &text, &structure)) {
when PyArg_ParseTuple() succeeds
taking False path
318 	return NULL;
319     }
320     PyObject *replacel = NULL;
321     PyObject *replace = NULL;
322     PyObject *replacenode  = NULL;
323     PyObject *newchildren  = NULL;
324     PyObject *newdict  = NULL;
325     PyObject *klass  = NULL;
326 
327     if (!(klass = PyObject_GetAttr(node, PySTR__class__))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
328     if (!(replacel = PyObject_GetAttr(node, PySTRReplace))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:9 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
329     if (!(replace = PyList_GetItem(replacel, 0))) return NULL;
taking False path
330     Py_DECREF(replacel);
when taking True path
331 
332     PyObject_SetAttr(node, PySTRtext, Py_None);
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyObject_SetAttr() succeeds
333 
334     if (!(newdict = PyDict_New())) return NULL;
when PyDict_New() succeeds
taking False path
335 
336     if (PyDict_SetItem(newdict, PySTRparent, node) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when PyDict_SetItem() succeeds
taking False path
337     if (PyDict_SetItem(newdict, PySTRattrib, emptyattrs) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
338     if (PyDict_SetItem(newdict, PySTRtext, text) == -1) return NULL;
when PyDict_SetItem() succeeds
taking False path
339     if (PyDict_SetItem(newdict, PySTRstructure, structure) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
340     if (PyDict_SetItem(newdict, PySTRtag, replace) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
341     if (PyDict_SetItem(newdict, PySTR_children, emptychildren) == -1) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
heap-region-10 is now referenced by 1 non-stack value(s): emptychildren
ob_refcnt is now refs: 0 + N where N >= 2
342 	return NULL;
343     }
344     if (!(replacenode = PyInstance_NewRaw(klass, newdict))) return NULL;
when PyInstance_NewRaw() succeeds
taking False path
345     Py_DECREF(klass);
when taking False path
calling tp_dealloc on new ref from call to PyObject_GetAttr allocated at meld3/cmeld3.c:327
346     Py_DECREF(newdict);
when taking True path
347 
348     if (!(newchildren = PyList_New(1))) return NULL;
when PyList_New() succeeds
taking False path
349     PyList_SET_ITEM(newchildren, 0, replacenode);  // steals a reference to rn
350     PyObject_SetAttr(node, PySTR_children, newchildren);
when PyObject_SetAttr() succeeds
351     Py_DECREF(newchildren);
when taking True path
352     Py_INCREF(Py_None);
353     return Py_None;
354     
355 }
ob_refcnt of heap-region-10 is 1 too low
was expecting final ob_refcnt to be N + 1 (for some unknown N)
due to object being referenced by: emptychildren
but final ob_refcnt is N + 0
found 14 similar trace(s) to this

File: meld3/cmeld3.c
Function: contenthandler
Error: ob_refcnt of '*replacenode' is 1 too high
313 static PyObject*
314 contenthandler(PyObject *self, PyObject *args) {
315     PyObject *node, *text, *structure;
316 	
317     if (!PyArg_ParseTuple(args, "OOO:content", &node, &text, &structure)) {
when PyArg_ParseTuple() succeeds
taking False path
318 	return NULL;
319     }
320     PyObject *replacel = NULL;
321     PyObject *replace = NULL;
322     PyObject *replacenode  = NULL;
323     PyObject *newchildren  = NULL;
324     PyObject *newdict  = NULL;
325     PyObject *klass  = NULL;
326 
327     if (!(klass = PyObject_GetAttr(node, PySTR__class__))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
328     if (!(replacel = PyObject_GetAttr(node, PySTRReplace))) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:9 as non-NULL
when PyObject_GetAttr() succeeds
taking False path
329     if (!(replace = PyList_GetItem(replacel, 0))) return NULL;
taking False path
330     Py_DECREF(replacel);
when taking True path
331 
332     PyObject_SetAttr(node, PySTRtext, Py_None);
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyObject_SetAttr() succeeds
333 
334     if (!(newdict = PyDict_New())) return NULL;
when PyDict_New() succeeds
taking False path
335 
336     if (PyDict_SetItem(newdict, PySTRparent, node) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when PyDict_SetItem() succeeds
taking False path
337     if (PyDict_SetItem(newdict, PySTRattrib, emptyattrs) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:7 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
338     if (PyDict_SetItem(newdict, PySTRtext, text) == -1) return NULL;
when PyDict_SetItem() succeeds
taking False path
339     if (PyDict_SetItem(newdict, PySTRstructure, structure) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
340     if (PyDict_SetItem(newdict, PySTRtag, replace) == -1) return NULL;
when treating unknown struct PyObject * from meld3/cmeld3.c:8 as non-NULL
when PyDict_SetItem() succeeds
taking False path
341     if (PyDict_SetItem(newdict, PySTR_children, emptychildren) == -1) {
when treating unknown struct PyObject * from meld3/cmeld3.c:6 as non-NULL
when treating unknown struct PyObject * from meld3/cmeld3.c:11 as non-NULL
when PyDict_SetItem() succeeds
taking False path
342 	return NULL;
343     }
344     if (!(replacenode = PyInstance_NewRaw(klass, newdict))) return NULL;
when PyInstance_NewRaw() succeeds
taking False path
new ref from (unknown) PyInstance_NewRaw allocated at:     if (!(replacenode = PyInstance_NewRaw(klass, newdict))) return NULL;
ob_refcnt is now refs: 1 + N where N >= 0
345     Py_DECREF(klass);
when taking False path
calling tp_dealloc on new ref from call to PyObject_GetAttr allocated at meld3/cmeld3.c:327
346     Py_DECREF(newdict);
when taking True path
347 
348     if (!(newchildren = PyList_New(1))) return NULL;
when PyList_New() fails
taking True path
349     PyList_SET_ITEM(newchildren, 0, replacenode);  // steals a reference to rn
350     PyObject_SetAttr(node, PySTR_children, newchildren);
351     Py_DECREF(newchildren);
352     Py_INCREF(Py_None);
353     return Py_None;
354     
355 }
ob_refcnt of '*replacenode' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 2 similar trace(s) to this