commit 9a8af8a79749c1a573ed97ac2d620c3621a17840 Author: David Malcolm dmalcolm@redhat.com Date: Fri Sep 2 15:08:16 2011 -0400
cpychecker: implement PyDict_New
libcpychecker/refcounts.py | 25 +++- .../refcounts/PyDict_New/correct/input.c | 49 +++++++ .../refcounts/PyDict_New/correct/script.py | 22 +++ .../refcounts/PyDict_New/correct/stdout.txt | 43 ++++++ .../refcounts/PyDict_SetItem/correct/stdout.txt | 136 ++++++++++---------- .../refcounts/PyDict_SetItem/incorrect/stdout.txt | 112 ++++++++-------- .../PyDict_SetItemString/correct/stdout.txt | 60 +++++----- .../PyDict_SetItemString/incorrect/stdout.txt | 54 ++++---- 8 files changed, 316 insertions(+), 185 deletions(-) --- diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py index 68cae63..30a2482 100644 --- a/libcpychecker/refcounts.py +++ b/libcpychecker/refcounts.py @@ -544,6 +544,22 @@ class MyState(State): return [Transition(self, s_success, '%s() succeeds' % fnname), Transition(self, s_failure, '%s() fails' % fnname)]
+ def make_transitions_for_new_ref_or_fail(self, stmt, objname=None): + """ + Generate the appropriate list of 2 transitions for a call to a + function that either: + - returns either a new ref, or + - fails with NULL and sets an exception + Optionally, a name for the new object can be supplied; otherwise + a sane default will be used. + """ + fnname = stmt.fn.operand.name + if objname is None: + objname = 'new ref from call to %s' % fnname + s_success, nonnull = self.mkstate_new_ref(stmt, objname) + s_failure = self.mkstate_exception(stmt, fnname) + return self.make_transitions_for_fncall(stmt, s_success, s_failure) + def eval_stmt_args(self, stmt): assert isinstance(stmt, gcc.GimpleCall) return [self.eval_rvalue(arg, stmt.loc) @@ -769,6 +785,9 @@ class MyState(State): t_notfound] #t_memoryexc]
+ def impl_PyDict_New(self, stmt): + return self.make_transitions_for_new_ref_or_fail(stmt) + def impl_PyDict_SetItem(self, stmt): # Declared in dictobject.h: # PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); @@ -1107,10 +1126,8 @@ class MyState(State): # Assume that all such functions either: # - return a new reference, or # - return NULL and set an exception (e.g. MemoryError) - s_success, nonnull = self.mkstate_new_ref(stmt, - 'new ref from (unknown) %s' % fnname) - s_failure = self.mkstate_exception(stmt, fnname) - return self.make_transitions_for_fncall(stmt, s_success, s_failure) + return self.make_transitions_for_new_ref_or_fail(stmt, + 'new ref from (unknown) %s' % fnname)
# Unknown function of other type: log('Invocation of unknown function: %r', fnname) diff --git a/tests/cpychecker/refcounts/PyDict_New/correct/input.c b/tests/cpychecker/refcounts/PyDict_New/correct/input.c new file mode 100644 index 0000000..574ddd0 --- /dev/null +++ b/tests/cpychecker/refcounts/PyDict_New/correct/input.c @@ -0,0 +1,49 @@ +/* + Copyright 2011 David Malcolm dmalcolm@redhat.com + Copyright 2011 Red Hat, Inc. + + This is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + http://www.gnu.org/licenses/. +*/ + +#include <Python.h> + +/* + Test of correct reference-handling in a call to PyDict_New +*/ + +PyObject * +test(PyObject *self, PyObject *args) +{ + PyObject *dict; + dict = PyDict_New(); + if (!dict) { + return NULL; + } + + /* "dict" should now have an ob_refcnt of 1 */ + return dict; +} +static PyMethodDef test_methods[] = { + {"test_method", test, METH_VARARGS, NULL}, + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + +/* + PEP-7 +Local variables: +c-basic-offset: 4 +indent-tabs-mode: nil +End: +*/ diff --git a/tests/cpychecker/refcounts/PyDict_New/correct/script.py b/tests/cpychecker/refcounts/PyDict_New/correct/script.py new file mode 100644 index 0000000..fdd5ba3 --- /dev/null +++ b/tests/cpychecker/refcounts/PyDict_New/correct/script.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2011 David Malcolm dmalcolm@redhat.com +# Copyright 2011 Red Hat, Inc. +# +# This is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# http://www.gnu.org/licenses/. + +from libcpychecker import main +main(verify_refcounting=True, + dump_traces=True, + show_traces=False) diff --git a/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt b/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt new file mode 100644 index 0000000..a942b69 --- /dev/null +++ b/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt @@ -0,0 +1,43 @@ +Trace 0: + Transitions: + 'PyDict_New() succeeds' + 'taking False path' + 'returning' + Return value: + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30)) from tests/cpychecker/refcounts/PyDict_New/correct/input.c:30 + r->ob_refcnt: refs: 1 + N where N >= 0 + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30), region=Region('PyTypeObject for new ref from call to PyDict_New')) + Region("region-for-arg-gcc.ParmDecl('self')"): + repr(): Region("region-for-arg-gcc.ParmDecl('self')") + str(): Region("region-for-arg-gcc.ParmDecl('self')") + r->ob_refcnt: refs: 0 + N where N >= 1 + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) + Region("region-for-arg-gcc.ParmDecl('args')"): + repr(): Region("region-for-arg-gcc.ParmDecl('args')") + str(): Region("region-for-arg-gcc.ParmDecl('args')") + r->ob_refcnt: refs: 0 + N where N >= 1 + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) + Exception: + (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_New/correct/input.c:28 + +Trace 1: + Transitions: + 'PyDict_New() fails' + 'taking True path' + 'returning' + Return value: + repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=32), value=0) + str(): (struct PyObject *)0 from tests/cpychecker/refcounts/PyDict_New/correct/input.c:32 + Region("region-for-arg-gcc.ParmDecl('self')"): + repr(): Region("region-for-arg-gcc.ParmDecl('self')") + str(): Region("region-for-arg-gcc.ParmDecl('self')") + r->ob_refcnt: refs: 0 + N where N >= 1 + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('self')")) + Region("region-for-arg-gcc.ParmDecl('args')"): + repr(): Region("region-for-arg-gcc.ParmDecl('args')") + str(): Region("region-for-arg-gcc.ParmDecl('args')") + r->ob_refcnt: refs: 0 + N where N >= 1 + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) + Exception: + RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) diff --git a/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt b/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt index adcd64e..b09d395 100644 --- a/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt +++ b/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt @@ -12,10 +12,10 @@ Trace 0: 'taking True path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -54,10 +54,10 @@ Trace 1: 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -96,10 +96,10 @@ Trace 2: 'taking True path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -139,10 +139,10 @@ Trace 3: 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:43' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -196,11 +196,11 @@ Trace 4: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -245,11 +245,11 @@ Trace 5: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -294,11 +294,11 @@ Trace 6: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -344,11 +344,11 @@ Trace 7: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -374,7 +374,7 @@ Trace 8: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking True path' 'taking False path' @@ -393,9 +393,9 @@ Trace 8: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -423,7 +423,7 @@ Trace 9: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking True path' 'taking False path' @@ -443,9 +443,9 @@ Trace 9: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -473,7 +473,7 @@ Trace 10: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' @@ -493,9 +493,9 @@ Trace 10: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -523,7 +523,7 @@ Trace 11: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' @@ -544,9 +544,9 @@ Trace 11: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -589,11 +589,11 @@ Trace 12: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -630,11 +630,11 @@ Trace 13: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38 @@ -653,7 +653,7 @@ Trace 14: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking True path' 'taking True path' @@ -671,9 +671,9 @@ Trace 14: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -694,7 +694,7 @@ Trace 15: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38' @@ -713,9 +713,9 @@ Trace 15: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:38: @@ -750,11 +750,11 @@ Trace 16: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Exception: RegionForGlobal(gcc.VarDecl('PyExc_MemoryError'))
@@ -766,7 +766,7 @@ Trace 17: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' 'taking True path' 'taking True path' 'returning' @@ -783,9 +783,9 @@ Trace 17: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33 r->ob_refcnt: None r->ob_type: None Exception: diff --git a/tests/cpychecker/refcounts/PyDict_SetItem/incorrect/stdout.txt b/tests/cpychecker/refcounts/PyDict_SetItem/incorrect/stdout.txt index 1afc25a..f69cf1e 100644 --- a/tests/cpychecker/refcounts/PyDict_SetItem/incorrect/stdout.txt +++ b/tests/cpychecker/refcounts/PyDict_SetItem/incorrect/stdout.txt @@ -10,10 +10,10 @@ Trace 0: 'taking True path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -50,10 +50,10 @@ Trace 1: 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -90,10 +90,10 @@ Trace 2: 'taking True path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -131,10 +131,10 @@ Trace 3: 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) from tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -186,11 +186,11 @@ Trace 4: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 @@ -233,11 +233,11 @@ Trace 5: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 @@ -280,11 +280,11 @@ Trace 6: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 @@ -328,11 +328,11 @@ Trace 7: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 @@ -356,7 +356,7 @@ Trace 8: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' 'taking False path' 'taking True path' 'taking False path' @@ -375,9 +375,9 @@ Trace 8: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: @@ -403,7 +403,7 @@ Trace 9: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' 'taking False path' 'taking True path' 'taking False path' @@ -423,9 +423,9 @@ Trace 9: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: @@ -451,7 +451,7 @@ Trace 10: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' @@ -471,9 +471,9 @@ Trace 10: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: @@ -499,7 +499,7 @@ Trace 11: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38' @@ -520,9 +520,9 @@ Trace 11: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: @@ -556,11 +556,11 @@ Trace 12: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=38)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:38 @@ -587,11 +587,11 @@ Trace 13: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=39)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:39 @@ -618,11 +618,11 @@ Trace 14: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=Region('PyTypeObject for new ref from call to PyDict_New')) Exception: RegionForGlobal(gcc.VarDecl('PyExc_MemoryError'))
diff --git a/tests/cpychecker/refcounts/PyDict_SetItemString/correct/stdout.txt b/tests/cpychecker/refcounts/PyDict_SetItemString/correct/stdout.txt index 7b5c3bd..e03c648 100644 --- a/tests/cpychecker/refcounts/PyDict_SetItemString/correct/stdout.txt +++ b/tests/cpychecker/refcounts/PyDict_SetItemString/correct/stdout.txt @@ -9,10 +9,10 @@ Trace 0: 'taking True path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -43,10 +43,10 @@ Trace 1: 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -91,11 +91,11 @@ Trace 2: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 @@ -131,11 +131,11 @@ Trace 3: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=37)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37 @@ -154,7 +154,7 @@ Trace 4: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' 'taking False path' 'taking True path' 'returning' @@ -171,9 +171,9 @@ Trace 4: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: @@ -194,7 +194,7 @@ Trace 5: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37' @@ -212,9 +212,9 @@ Trace 5: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:37: @@ -248,11 +248,11 @@ Trace 6: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) Exception: RegionForGlobal(gcc.VarDecl('PyExc_MemoryError'))
@@ -264,7 +264,7 @@ Trace 7: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' 'taking True path' 'returning' Return value: @@ -280,9 +280,9 @@ Trace 7: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32 r->ob_refcnt: None r->ob_type: None Exception: diff --git a/tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/stdout.txt b/tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/stdout.txt index 1dad097..16dbaa3 100644 --- a/tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/stdout.txt +++ b/tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/stdout.txt @@ -8,10 +8,10 @@ Trace 0: 'taking False path' 'returning' Return value: - repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32))) - str(): (struct PyObject *)&RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) from tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: refs: 1 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") @@ -56,11 +56,11 @@ Trace 1: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 @@ -96,11 +96,11 @@ Trace 2: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: repr(): RegionOnHeap('PyLongObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=37)) str(): PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37 @@ -119,7 +119,7 @@ Trace 3: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' 'taking False path' 'taking True path' 'returning' @@ -136,9 +136,9 @@ Trace 3: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: @@ -159,7 +159,7 @@ Trace 4: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' 'taking False path' 'taking False path' 'calling tp_dealloc on PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37' @@ -177,9 +177,9 @@ Trace 4: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: None r->ob_type: None PyLongObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:37: @@ -213,11 +213,11 @@ Trace 5: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: refs: 0 + N where N >= 0 - r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from (unknown) PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=Region('PyTypeObject for new ref from call to PyDict_New')) Exception: RegionForGlobal(gcc.VarDecl('PyExc_MemoryError'))
@@ -229,7 +229,7 @@ Trace 6: 'taking True path' 'taking False path' 'taking False path' - 'calling tp_dealloc on new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' 'taking True path' 'returning' Return value: @@ -245,9 +245,9 @@ Trace 6: str(): Region("region-for-arg-gcc.ParmDecl('args')") r->ob_refcnt: refs: 0 + N where N >= 1 r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=27), region=Region("region-for-type-of-arg-gcc.ParmDecl('args')")) - new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: - repr(): RegionOnHeap('new ref from (unknown) PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) - str(): new ref from (unknown) PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 + new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('new ref from call to PyDict_New', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): new ref from call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32 r->ob_refcnt: None r->ob_type: None Exception:
gcc-python-plugin-commits@lists.stg.fedorahosted.org