File: | ./libxml.c |
Function: | libxml_xmlXPathFuncCallback |
Error: | ob_refcnt of new ref from (unknown) libxml_xmlXPathParserContextPtrWrap is 1 too high |
2073 static void
2074 libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs)
2075 {
2076 PyObject *list, *cur, *result;
2077 xmlXPathObjectPtr obj;
2078 xmlXPathContextPtr rctxt;
2079 PyObject *current_function = NULL;
2080 const xmlChar *name;
2081 const xmlChar *ns_uri;
2082 int i;
2083
2084 if (ctxt == NULL)
when taking False path
2085 return;
2086 rctxt = ctxt->context;
when treating unknown struct xmlXPathParserContext * from ./libxml.c:2074 as non-NULL
2087 if (rctxt == NULL)
when treating unknown struct xmlXPathContext * from ./libxml.c:2086 as non-NULL
taking False path
2088 return;
2089 name = rctxt->function;
2090 ns_uri = rctxt->functionURI;
2091 #ifdef DEBUG_XPATH
2092 printf("libxml_xmlXPathFuncCallback called name %s URI %s\n", name,
2093 ns_uri);
2094 #endif
2095
2096 /*
2097 * Find the function, it should be there it was there at lookup
2098 */
2099 for (i = 0; i < libxml_xpathCallbacksNb; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from ./libxml.c:72
taking False path
2100 if ( /* TODO (ctxt == libxml_xpathCallbacks[i].ctx) && */
when considering range: -0x80000000 <= value <= -1
taking True path
2101 (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
when treating unknown struct libxml_xpathCallback[] * from ./libxml.c:71 as non-NULL
when considering range: -0x80000000 <= value <= -1
taking True path
2102 (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
2103 current_function = (*libxml_xpathCallbacks)[i].function;
2104 }
2105 }
2106 if (current_function == NULL) {
when treating unknown struct PyObject * from ./libxml.c:2103 as non-NULL
taking False path
2107 printf
2108 ("libxml_xmlXPathFuncCallback: internal error %s not found !\n",
2109 name);
2110 return;
2111 }
2112
2113 list = PyTuple_New(nargs + 1);
when PyTuple_New() succeeds
2114 PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
when libxml_xmlXPathParserContextPtrWrap() succeeds
when considering range: -0x7fffffff <= value <= 0
when PyTuple_SetItem() fails (index out of range)
new ref from (unknown) libxml_xmlXPathParserContextPtrWrap allocated at: PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
ob_refcnt is now refs: 1 + N where N >= 0
2115 for (i = nargs - 1; i >= 0; i--) {
when considering range: 0 <= value <= 0x7ffffffe
taking True path
when considering value == (int)-1 from ./libxml.c:2115
taking False path
2116 obj = valuePop(ctxt);
2117 cur = libxml_xmlXPathObjectPtrWrap(obj);
when libxml_xmlXPathObjectPtrWrap() fails
2118 PyTuple_SetItem(list, i + 1, cur);
when PyTuple_SetItem() succeeds
2119 }
2120 result = PyEval_CallObject(current_function, list);
when PyEval_CallObjectWithKeywords() succeeds
2121 Py_DECREF(list);
when taking True path
2122
2123 obj = libxml_xmlXPathObjectPtrConvert(result);
2124 valuePush(ctxt, obj);
2125 }
ob_refcnt of new ref from (unknown) libxml_xmlXPathParserContextPtrWrap 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 16 similar trace(s) to this
File: | ./libxml.c |
Function: | libxml_xmlXPathFuncCallback |
Error: | ob_refcnt of '*result' is 1 too high |
2073 static void
2074 libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs)
2075 {
2076 PyObject *list, *cur, *result;
2077 xmlXPathObjectPtr obj;
2078 xmlXPathContextPtr rctxt;
2079 PyObject *current_function = NULL;
2080 const xmlChar *name;
2081 const xmlChar *ns_uri;
2082 int i;
2083
2084 if (ctxt == NULL)
when taking False path
2085 return;
2086 rctxt = ctxt->context;
when treating unknown struct xmlXPathParserContext * from ./libxml.c:2074 as non-NULL
2087 if (rctxt == NULL)
when treating unknown struct xmlXPathContext * from ./libxml.c:2086 as non-NULL
taking False path
2088 return;
2089 name = rctxt->function;
2090 ns_uri = rctxt->functionURI;
2091 #ifdef DEBUG_XPATH
2092 printf("libxml_xmlXPathFuncCallback called name %s URI %s\n", name,
2093 ns_uri);
2094 #endif
2095
2096 /*
2097 * Find the function, it should be there it was there at lookup
2098 */
2099 for (i = 0; i < libxml_xpathCallbacksNb; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from ./libxml.c:72
taking False path
2100 if ( /* TODO (ctxt == libxml_xpathCallbacks[i].ctx) && */
when considering range: -0x80000000 <= value <= -1
taking True path
2101 (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
when treating unknown struct libxml_xpathCallback[] * from ./libxml.c:71 as non-NULL
when considering range: -0x80000000 <= value <= -1
taking True path
2102 (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
2103 current_function = (*libxml_xpathCallbacks)[i].function;
2104 }
2105 }
2106 if (current_function == NULL) {
when treating unknown struct PyObject * from ./libxml.c:2103 as non-NULL
taking False path
2107 printf
2108 ("libxml_xmlXPathFuncCallback: internal error %s not found !\n",
2109 name);
2110 return;
2111 }
2112
2113 list = PyTuple_New(nargs + 1);
when PyTuple_New() succeeds
2114 PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
when libxml_xmlXPathParserContextPtrWrap() succeeds
when considering range: -0x7fffffff <= value <= 0
when PyTuple_SetItem() fails (index out of range)
2115 for (i = nargs - 1; i >= 0; i--) {
when considering range: 0 <= value <= 0x7ffffffe
taking True path
when considering value == (int)-1 from ./libxml.c:2115
taking False path
2116 obj = valuePop(ctxt);
2117 cur = libxml_xmlXPathObjectPtrWrap(obj);
when libxml_xmlXPathObjectPtrWrap() fails
2118 PyTuple_SetItem(list, i + 1, cur);
when PyTuple_SetItem() succeeds
2119 }
2120 result = PyEval_CallObject(current_function, list);
when PyEval_CallObjectWithKeywords() succeeds
new ref from call to PyEval_CallObjectWithKeywords allocated at: result = PyEval_CallObject(current_function, list);
ob_refcnt is now refs: 1 + N where N >= 0
2121 Py_DECREF(list);
when taking True path
2122
2123 obj = libxml_xmlXPathObjectPtrConvert(result);
2124 valuePush(ctxt, obj);
2125 }
ob_refcnt of '*result' 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 8 similar trace(s) to this
File: | ./libxml.c |
Function: | libxml_xmlXPathFuncCallback |
Error: | ob_refcnt of '*cur' is 1 too high |
2073 static void
2074 libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs)
2075 {
2076 PyObject *list, *cur, *result;
2077 xmlXPathObjectPtr obj;
2078 xmlXPathContextPtr rctxt;
2079 PyObject *current_function = NULL;
2080 const xmlChar *name;
2081 const xmlChar *ns_uri;
2082 int i;
2083
2084 if (ctxt == NULL)
when taking False path
2085 return;
2086 rctxt = ctxt->context;
when treating unknown struct xmlXPathParserContext * from ./libxml.c:2074 as non-NULL
2087 if (rctxt == NULL)
when treating unknown struct xmlXPathContext * from ./libxml.c:2086 as non-NULL
taking False path
2088 return;
2089 name = rctxt->function;
2090 ns_uri = rctxt->functionURI;
2091 #ifdef DEBUG_XPATH
2092 printf("libxml_xmlXPathFuncCallback called name %s URI %s\n", name,
2093 ns_uri);
2094 #endif
2095
2096 /*
2097 * Find the function, it should be there it was there at lookup
2098 */
2099 for (i = 0; i < libxml_xpathCallbacksNb; i++) {
when considering range: 1 <= value <= 0x7fffffff
taking True path
when considering value == (int)1 from ./libxml.c:72
taking False path
2100 if ( /* TODO (ctxt == libxml_xpathCallbacks[i].ctx) && */
when considering range: -0x80000000 <= value <= -1
taking True path
2101 (xmlStrEqual(name, (*libxml_xpathCallbacks)[i].name)) &&
when treating unknown struct libxml_xpathCallback[] * from ./libxml.c:71 as non-NULL
when considering range: -0x80000000 <= value <= -1
taking True path
2102 (xmlStrEqual(ns_uri, (*libxml_xpathCallbacks)[i].ns_uri))) {
2103 current_function = (*libxml_xpathCallbacks)[i].function;
2104 }
2105 }
2106 if (current_function == NULL) {
when treating unknown struct PyObject * from ./libxml.c:2103 as non-NULL
taking False path
2107 printf
2108 ("libxml_xmlXPathFuncCallback: internal error %s not found !\n",
2109 name);
2110 return;
2111 }
2112
2113 list = PyTuple_New(nargs + 1);
when PyTuple_New() succeeds
2114 PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
when libxml_xmlXPathParserContextPtrWrap() succeeds
when considering range: -0x7fffffff <= value <= 0
when PyTuple_SetItem() fails (index out of range)
2115 for (i = nargs - 1; i >= 0; i--) {
when considering range: 0 <= value <= 0x7ffffffe
taking True path
when considering value == (int)-1 from ./libxml.c:2115
taking False path
2116 obj = valuePop(ctxt);
2117 cur = libxml_xmlXPathObjectPtrWrap(obj);
when libxml_xmlXPathObjectPtrWrap() succeeds
new ref from (unknown) libxml_xmlXPathObjectPtrWrap allocated at: cur = libxml_xmlXPathObjectPtrWrap(obj);
ob_refcnt is now refs: 1 + N where N >= 0
2118 PyTuple_SetItem(list, i + 1, cur);
when PyTuple_SetItem() fails (index out of range)
2119 }
2120 result = PyEval_CallObject(current_function, list);
when PyEval_CallObjectWithKeywords() succeeds
2121 Py_DECREF(list);
when taking True path
2122
2123 obj = libxml_xmlXPathObjectPtrConvert(result);
2124 valuePush(ctxt, obj);
2125 }
ob_refcnt of '*cur' 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 3 similar trace(s) to this