commit 1a17d75f688a0d235095fc8029288d1736f2d4e0 Author: David Malcolm dmalcolm@redhat.com Date: Fri Sep 2 15:47:57 2011 -0400
cpychecker: make PyDict_New set the ob_type of the new object to &PyDict_Type
libcpychecker/refcounts.py | 4 +- .../refcounts/PyDict_New/correct/stdout.txt | 6 +- .../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 ++++---- 6 files changed, 187 insertions(+), 185 deletions(-) --- diff --git a/libcpychecker/refcounts.py b/libcpychecker/refcounts.py index 8c120ea..efb2f93 100644 --- a/libcpychecker/refcounts.py +++ b/libcpychecker/refcounts.py @@ -786,7 +786,9 @@ class MyState(State): #t_memoryexc]
def impl_PyDict_New(self, stmt): - return self.make_transitions_for_new_ref_or_fail(stmt) + newobj, t_success, t_failure = self.impl_object_ctor(stmt, + 'PyDictObject', 'PyDict_Type') + return [t_success, t_failure]
def impl_PyDict_SetItem(self, stmt): # Declared in dictobject.h: diff --git a/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt b/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt index a942b69..7a0ba42 100644 --- a/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt +++ b/tests/cpychecker/refcounts/PyDict_New/correct/stdout.txt @@ -4,10 +4,10 @@ Trace 0: '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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_New/correct/input.c', line=30), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) Region("region-for-arg-gcc.ParmDecl('self')"): repr(): Region("region-for-arg-gcc.ParmDecl('self')") str(): Region("region-for-arg-gcc.ParmDecl('self')") diff --git a/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt b/tests/cpychecker/refcounts/PyDict_SetItem/correct/stdout.txt index b09d395..cfd5d07 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/correct/input.c', line=33)) + str(): PyDictObject 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 f69cf1e..2729164 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c:33: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItem/incorrect/input.c', line=33), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 e03c648..7dbb800 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/correct/input.c', line=32)) + str(): PyDictObject 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 16dbaa3..41a5989 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 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 + repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32))) + str(): (struct PyObject *)&RegionOnHeap('PyDictObject', 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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 call to PyDict_New')) + r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type'))) 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 call to PyDict_New allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32' + 'calling tp_dealloc on PyDictObject 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 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 + PyDictObject allocated at tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c:32: + repr(): RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/PyDict_SetItemString/incorrect/input.c', line=32)) + str(): PyDictObject 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