File: | src/BTrees/BucketTemplate.c |
Function: | bucket_byValue |
Error: | ob_refcnt of '*item.294' is 1 too high |
930 static PyObject *
931 bucket_byValue(Bucket *self, PyObject *omin)
932 {
when considering range: -128 <= value <= 1
taking False path
933 PyObject *r=0, *o=0, *item=0;
934 VALUE_TYPE min;
935 VALUE_TYPE v;
936 int i, l, copied=1;
937
938 PER_USE_OR_RETURN(self, NULL);
when considering range: -128 <= value <= -2
taking False path
when considering range: -128 <= value <= -1
taking False path
939
940 COPY_VALUE_FROM_ARG(min, omin, copied);
941 UNLESS(copied) return NULL;
taking False path
942
943 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
944 if (TEST_VALUE(self->values[i], min) >= 0)
945 l++;
946
947 UNLESS (r=PyList_New(l)) goto err;
when PyList_New() succeeds
taking False path
948
949 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
950 {
951 if (TEST_VALUE(self->values[i], min) < 0) continue;
952
953 UNLESS (item = PyTuple_New(2)) goto err;
954
955 COPY_KEY_TO_OBJECT(o, self->keys[i]);
956 UNLESS (o) goto err;
957 PyTuple_SET_ITEM(item, 1, o);
958
959 COPY_VALUE(v, self->values[i]);
960 NORMALIZE_VALUE(v, min);
961 COPY_VALUE_TO_OBJECT(o, v);
962 DECREF_VALUE(v);
963 UNLESS (o) goto err;
964 PyTuple_SET_ITEM(item, 0, o);
965
966 if (PyList_SetItem(r, l, item) < 0) goto err;
967 l++;
968
969 item = 0;
970 }
971
972 item=PyObject_GetAttr(r,sort_str);
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
new ref from call to PyObject_GetAttr allocated at: item=PyObject_GetAttr(r,sort_str);
ob_refcnt is now refs: 1 + N where N >= 0
973 UNLESS (item) goto err;
taking False path
974 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
975 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:974 as non-NULL
taking False path
976 ASSIGN(item, PyObject_GetAttr(r, reverse_str));
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
977 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:976 as non-NULL
taking False path
978 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
979 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:978 as non-NULL
taking False path
980 Py_DECREF(item);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
981
982 PER_UNUSE(self);
when treating unknown struct cPersistenceCAPIstruct * from src/persistent/cPersistence.h:112 as non-NULL
calling unknown void (*) (struct cPersistentObject *) from src/BTrees/BucketTemplate.c:982
983 return r;
984
985 err:
986 PER_UNUSE(self);
987 Py_XDECREF(r);
988 Py_XDECREF(item);
989 return NULL;
990 }
ob_refcnt of '*item.294' 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 14 similar trace(s) to this
File: | src/BTrees/BucketTemplate.c |
Function: | bucket_byValue |
Error: | ob_refcnt of new ref from call to PyObject_CallObject is 1 too high |
930 static PyObject *
931 bucket_byValue(Bucket *self, PyObject *omin)
932 {
when considering range: -128 <= value <= 1
taking False path
933 PyObject *r=0, *o=0, *item=0;
934 VALUE_TYPE min;
935 VALUE_TYPE v;
936 int i, l, copied=1;
937
938 PER_USE_OR_RETURN(self, NULL);
when considering range: -128 <= value <= -2
taking False path
when considering range: -128 <= value <= -1
taking False path
939
940 COPY_VALUE_FROM_ARG(min, omin, copied);
941 UNLESS(copied) return NULL;
taking False path
942
943 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
944 if (TEST_VALUE(self->values[i], min) >= 0)
945 l++;
946
947 UNLESS (r=PyList_New(l)) goto err;
when PyList_New() succeeds
taking False path
948
949 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
950 {
951 if (TEST_VALUE(self->values[i], min) < 0) continue;
952
953 UNLESS (item = PyTuple_New(2)) goto err;
954
955 COPY_KEY_TO_OBJECT(o, self->keys[i]);
956 UNLESS (o) goto err;
957 PyTuple_SET_ITEM(item, 1, o);
958
959 COPY_VALUE(v, self->values[i]);
960 NORMALIZE_VALUE(v, min);
961 COPY_VALUE_TO_OBJECT(o, v);
962 DECREF_VALUE(v);
963 UNLESS (o) goto err;
964 PyTuple_SET_ITEM(item, 0, o);
965
966 if (PyList_SetItem(r, l, item) < 0) goto err;
967 l++;
968
969 item = 0;
970 }
971
972 item=PyObject_GetAttr(r,sort_str);
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
973 UNLESS (item) goto err;
taking False path
974 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
new ref from call to PyObject_CallObject allocated at: ASSIGN(item, PyObject_CallObject(item, NULL));
ob_refcnt is now refs: 1 + N where N >= 0
975 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:974 as non-NULL
taking False path
976 ASSIGN(item, PyObject_GetAttr(r, reverse_str));
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
977 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:976 as non-NULL
taking False path
978 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
979 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:978 as non-NULL
taking False path
980 Py_DECREF(item);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
981
982 PER_UNUSE(self);
when treating unknown struct cPersistenceCAPIstruct * from src/persistent/cPersistence.h:112 as non-NULL
calling unknown void (*) (struct cPersistentObject *) from src/BTrees/BucketTemplate.c:982
983 return r;
984
985 err:
986 PER_UNUSE(self);
987 Py_XDECREF(r);
988 Py_XDECREF(item);
989 return NULL;
990 }
ob_refcnt of new ref from call to PyObject_CallObject 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 29 similar trace(s) to this
File: | src/BTrees/BucketTemplate.c |
Function: | bucket_byValue |
Error: | ob_refcnt of new ref from call to PyObject_GetAttr is 1 too high |
930 static PyObject *
931 bucket_byValue(Bucket *self, PyObject *omin)
932 {
when considering range: -128 <= value <= 1
taking False path
933 PyObject *r=0, *o=0, *item=0;
934 VALUE_TYPE min;
935 VALUE_TYPE v;
936 int i, l, copied=1;
937
938 PER_USE_OR_RETURN(self, NULL);
when considering range: -128 <= value <= -2
taking False path
when considering range: -128 <= value <= -1
taking False path
939
940 COPY_VALUE_FROM_ARG(min, omin, copied);
941 UNLESS(copied) return NULL;
taking False path
942
943 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
944 if (TEST_VALUE(self->values[i], min) >= 0)
945 l++;
946
947 UNLESS (r=PyList_New(l)) goto err;
when PyList_New() succeeds
taking False path
948
949 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
950 {
951 if (TEST_VALUE(self->values[i], min) < 0) continue;
952
953 UNLESS (item = PyTuple_New(2)) goto err;
954
955 COPY_KEY_TO_OBJECT(o, self->keys[i]);
956 UNLESS (o) goto err;
957 PyTuple_SET_ITEM(item, 1, o);
958
959 COPY_VALUE(v, self->values[i]);
960 NORMALIZE_VALUE(v, min);
961 COPY_VALUE_TO_OBJECT(o, v);
962 DECREF_VALUE(v);
963 UNLESS (o) goto err;
964 PyTuple_SET_ITEM(item, 0, o);
965
966 if (PyList_SetItem(r, l, item) < 0) goto err;
967 l++;
968
969 item = 0;
970 }
971
972 item=PyObject_GetAttr(r,sort_str);
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
973 UNLESS (item) goto err;
taking False path
974 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
975 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:974 as non-NULL
taking False path
976 ASSIGN(item, PyObject_GetAttr(r, reverse_str));
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
new ref from call to PyObject_GetAttr allocated at: ASSIGN(item, PyObject_GetAttr(r, reverse_str));
ob_refcnt is now refs: 1 + N where N >= 0
977 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:976 as non-NULL
taking False path
978 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
979 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:978 as non-NULL
taking False path
980 Py_DECREF(item);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
981
982 PER_UNUSE(self);
when treating unknown struct cPersistenceCAPIstruct * from src/persistent/cPersistence.h:112 as non-NULL
calling unknown void (*) (struct cPersistentObject *) from src/BTrees/BucketTemplate.c:982
983 return r;
984
985 err:
986 PER_UNUSE(self);
987 Py_XDECREF(r);
988 Py_XDECREF(item);
989 return NULL;
990 }
ob_refcnt of new ref from call to PyObject_GetAttr 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 14 similar trace(s) to this
File: | src/BTrees/BucketTemplate.c |
Function: | bucket_byValue |
Error: | returning (PyObject*)NULL without setting an exception |
930 static PyObject *
931 bucket_byValue(Bucket *self, PyObject *omin)
932 {
when considering range: -128 <= value <= 1
taking False path
933 PyObject *r=0, *o=0, *item=0;
934 VALUE_TYPE min;
935 VALUE_TYPE v;
936 int i, l, copied=1;
937
938 PER_USE_OR_RETURN(self, NULL);
when considering range: -128 <= value <= -2
taking False path
when considering range: -128 <= value <= -1
taking False path
939
940 COPY_VALUE_FROM_ARG(min, omin, copied);
941 UNLESS(copied) return NULL;
taking False path
942
943 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
944 if (TEST_VALUE(self->values[i], min) >= 0)
945 l++;
946
947 UNLESS (r=PyList_New(l)) goto err;
when PyList_New() succeeds
taking False path
948
949 for (i=0, l=0; i < self->len; i++)
when considering range: -0x80000000 <= value <= 0
taking False path
950 {
951 if (TEST_VALUE(self->values[i], min) < 0) continue;
952
953 UNLESS (item = PyTuple_New(2)) goto err;
954
955 COPY_KEY_TO_OBJECT(o, self->keys[i]);
956 UNLESS (o) goto err;
957 PyTuple_SET_ITEM(item, 1, o);
958
959 COPY_VALUE(v, self->values[i]);
960 NORMALIZE_VALUE(v, min);
961 COPY_VALUE_TO_OBJECT(o, v);
962 DECREF_VALUE(v);
963 UNLESS (o) goto err;
964 PyTuple_SET_ITEM(item, 0, o);
965
966 if (PyList_SetItem(r, l, item) < 0) goto err;
967 l++;
968
969 item = 0;
970 }
971
972 item=PyObject_GetAttr(r,sort_str);
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
973 UNLESS (item) goto err;
taking False path
974 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
975 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:974 as non-NULL
taking False path
976 ASSIGN(item, PyObject_GetAttr(r, reverse_str));
when treating unknown struct PyObject * from src/BTrees/BTreeModuleTemplate.c:55 as non-NULL
when PyObject_GetAttr() succeeds
977 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:976 as non-NULL
taking False path
978 ASSIGN(item, PyObject_CallObject(item, NULL));
when PyObject_CallObject() succeeds
979 UNLESS (item) goto err;
when treating unknown struct PyObject * * from src/BTrees/BucketTemplate.c:978 as NULL
taking True path
980 Py_DECREF(item);
981
982 PER_UNUSE(self);
983 return r;
984
985 err:
986 PER_UNUSE(self);
when treating unknown struct cPersistenceCAPIstruct * from src/persistent/cPersistence.h:112 as non-NULL
calling unknown void (*) (struct cPersistentObject *) from src/BTrees/BucketTemplate.c:986
987 Py_XDECREF(r);
taking False path
when taking True path
988 Py_XDECREF(item);
taking True path
989 return NULL;
990 }
returning (PyObject*)NULL without setting an exception
found 5 similar trace(s) to this