Debian Codegraph @

examples/example-2.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright 2013 David Malcolm <[email protected]>
4 Copyright 2013 Red Hat, Inc.
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 USA
20 -->
21 <analysis>
22 <metadata>
23 <generator name="cpychecker" version="0.11"/>
24 <sut>
25 <source-rpm name="python-ethtool" version="0.7"
26 release="4.fc19" build-arch="x86_64"/>
27 </sut>
28 </metadata>
29
30 <results>
31 <issue cwe="401" test-id="refcount-too-high">
32
33 <!-- Example of a report with a trace -->
34
35 <message>ob_refcnt of '*item' is 1 too high</message>
36 <notes>was expecting final item->ob_refcnt to be N + 1 (for some unknown N)
37 due to object being referenced by: PyListObject.ob_item[0]
38 but final item->ob_refcnt is N + 2</notes>
39
40 <location>
41 <file given-path="examples/python-src-example.c">
42 <hash alg="sha1" hexdigest="6ba29daa94d64b48071e299a79f2a00dcd99eeb1"/>
43 </file>
44 <function name="make_a_list_of_random_ints_badly"/>
45 <point line="40" column="4"/>
46 </location>
47
48 <trace>
49 <state>
50 <location>
51 <file given-path="examples/python-src-example.c">
52 <hash alg="sha1" hexdigest="6ba29daa94d64b48071e299a79f2a00dcd99eeb1"/>
53 </file>
54 <function name="make_a_list_of_random_ints_badly"/>
55 <point line="36" column="14"/>
56 </location>
57 <notes>PyLongObject allocated at: item = PyLong_FromLong(random());</notes>
58 </state>
59
60 <state>
61 <location>
62 <file given-path="examples/python-src-example.c">
63 <hash alg="sha1" hexdigest="6ba29daa94d64b48071e299a79f2a00dcd99eeb1"/>
64 </file>
65 <function name="make_a_list_of_random_ints_badly"/>
66 <point line="37" column="8"/>
67 </location>
68 <notes>when PyList_Append() succeeds</notes>
69 </state>
70
71 <state>
72 <location>
73 <file given-path="examples/python-src-example.c">
74 <hash alg="sha1" hexdigest="6ba29daa94d64b48071e299a79f2a00dcd99eeb1"/>
75 </file>
76 <function name="make_a_list_of_random_ints_badly"/>
77 <point line="40" column="4"/>
78 </location>
79 </state>
80 </trace>
81 </issue>
82 </results>
83 </analysis>