]> andersk Git - splint.git/blame - test/sharing.expect
Improved tracking of state change locations. Added +showdeephistory
[splint.git] / test / sharing.expect
CommitLineData
885824d3 1
2sharing1.c: (in function f)
3sharing1.c:12:12: Only storage x not released before return
4 sharing1.c:8:24: Storage x becomes only
5sharing1.c:13:2: Only storage x not released before return
6 sharing1.c:8:24: Storage x becomes only
7sharing1.c: (in function f2)
8sharing1.c:19:12: Only storage y not released before return
9 sharing1.c:15:43: Storage y becomes only
10sharing1.c: (in function f3)
11sharing1.c:24:3: Only storage x assigned to shared: globshared1 = x
12 sharing1.c:22:25: Storage x becomes only
13sharing1.c:25:2: Only storage x not released before return
14 sharing1.c:22:25: Storage x becomes only
15sharing1.c: (in function f4)
80ee600a 16sharing1.c:29:3: Only storage zonly (type int *) not released before
17 assignment: zonly = x
885824d3 18 sharing1.c:6:19: Storage zonly becomes only
19sharing1.c: (in function g)
20sharing1.c:41:7: Implicitly temp storage imp passed as only param: f3 (imp)
21sharing1.c:42:4: Variable imp used after being released
22 sharing1.c:41:7: Storage imp released
23sharing1.c:44:12: Immediate address &x passed as only param: f (&x, ...)
24sharing1.c:44:12: Parameter 1 (&x) to function f is declared only but is
25 aliased by parameter 2 (&x)
26sharing1.c:48:14: Possibly null storage y3 passed as non-null param:
27 f2 (y3, ...)
28 sharing1.c:37:13: Storage y3 may become null
29sharing1.c:48:14: Passed storage y3 not completely defined (*y3 is undefined):
30 f2 (y3, ...)
16c024b5 31 sharing1.c:37:33: Storage *y3 allocated
885824d3 32sharing1.c:48:18: Parameter 2 (y3) to function f2 is declared only but is
33 aliased by parameter 1 (y3)
34sharing1.c:50:4: Variable y3 used after being released
35 sharing1.c:48:18: Storage y3 released
36sharing1.c:51:12: Possibly null storage y passed as non-null param: f (y, ...)
37 sharing1.c:35:12: Storage y may become null
38sharing1.c:51:12: Passed storage y not completely defined (*y is undefined):
39 f (y, ...)
16c024b5 40 sharing1.c:35:32: Storage *y allocated
885824d3 41sharing1.c:52:12: Shared storage globshared1 passed as only param:
42 f (globshared1, ...)
43 sharing1.c:4:19: Storage globshared1 becomes shared
44sharing1.c:56:9: Shared storage globshared2 passed as only param:
45 free (globshared2)
46 sharing1.c:5:19: Storage globshared2 becomes shared
47sharing1.c:59:11: Variable y used after being released
48 sharing1.c:51:12: Storage y released
49sharing1.c:59:13: Fresh storage y2 not released before return
16c024b5 50 sharing1.c:36:33: Fresh storage y2 created
885824d3 51sharing1.c:59:13: Function returns with global globonly referencing released
52 storage
16c024b5 53 sharing1.c:57:9: Storage globonly released
885824d3 54
11db3170 55Finished checking --- 21 code warnings, as expected
885824d3 56
57sharing3.c: (in function string_copy)
58sharing3.c:17:10: Implicitly temp storage s returned as only: s
59sharing3.c: (in function string_free1)
60sharing3.c:32:9: Implicitly temp storage s passed as only param: free (s)
61sharing3.c: (in function string_free3)
62sharing3.c:45:2: Fresh storage t not released before return
16c024b5 63 sharing3.c:42:29: Fresh storage t created
885824d3 64
11db3170 65Finished checking --- 3 code warnings, as expected
885824d3 66
67sharing4.c: (in function f)
80ee600a 68sharing4.c:18:3: Only storage globonly1 (type char *) not released before
69 assignment: globonly1 = only1
885824d3 70 sharing4.c:1:20: Storage globonly1 becomes only
80ee600a 71sharing4.c:23:3: Only storage globonly4 (type char *) not released before
72 assignment: globonly4 = shared1
885824d3 73 sharing4.c:4:20: Storage globonly4 becomes only
74sharing4.c:23:3: Shared storage shared1 assigned to only: globonly4 = shared1
75 sharing4.c:14:26: Storage shared1 becomes shared
76sharing4.c:27:3: Only storage globonly5 assigned to shared:
77 globshared1 = globonly5
78 sharing4.c:5:20: Storage globonly5 becomes only
79sharing4.c:30:3: Only storage globonly1 assigned to shared (local1 aliases
80 globonly1): globshared1 = local1
81 sharing4.c:1:20: Storage globonly1 becomes only
82sharing4.c:30:3: Kept storage only1 assigned to shared (local1 aliases only1):
83 globshared1 = local1
84 sharing4.c:18:3: Storage only1 becomes kept
85sharing4.c:32:3: Only storage assigned to shared:
86 globshared1 = string_copy(local1)
87sharing4.c:34:3: Temp storage temp2 assigned to shared: globshared2 = temp2
88 sharing4.c:13:37: Storage temp2 becomes temp
80ee600a 89sharing4.c:35:3: Only storage globonly4 (type char *) not released before
90 assignment: globonly4 = temp1
885824d3 91 sharing4.c:4:20: Storage globonly4 becomes only
92sharing4.c:35:3: Implicitly temp storage temp1 assigned to only:
93 globonly4 = temp1
94sharing4.c:38:9: Shared storage shared1 passed as only param: free (shared1)
95 sharing4.c:14:26: Storage shared1 becomes shared
96sharing4.c:42:12: Only storage only3 not released before return
97 sharing4.c:12:72: Storage only3 becomes only
98sharing4.c:42:12: Function returns with global globonly3 referencing released
99 storage
16c024b5 100 sharing4.c:21:9: Storage globonly3 released
885824d3 101
11db3170 102Finished checking --- 13 code warnings, as expected
885824d3 103
104sharing4.c: (in function f)
80ee600a 105sharing4.c:18:3: Only storage globonly1 (type char *) not released before
106 assignment: globonly1 = only1
885824d3 107 sharing4.c:1:20: Storage globonly1 becomes only
80ee600a 108sharing4.c:23:3: Only storage globonly4 (type char *) not released before
109 assignment: globonly4 = shared1
885824d3 110 sharing4.c:4:20: Storage globonly4 becomes only
111sharing4.c:23:3: Shared storage shared1 assigned to only: globonly4 = shared1
112 sharing4.c:14:26: Storage shared1 becomes shared
113sharing4.c:27:3: Only storage globonly5 assigned to shared:
114 globshared1 = globonly5
115 sharing4.c:5:20: Storage globonly5 becomes only
116sharing4.c:30:3: Only storage globonly1 assigned to shared (local1 aliases
117 globonly1): globshared1 = local1
118 sharing4.c:1:20: Storage globonly1 becomes only
119sharing4.c:30:3: Kept storage only1 assigned to shared (local1 aliases only1):
120 globshared1 = local1
121 sharing4.c:18:3: Storage only1 becomes kept
122sharing4.c:32:3: Only storage assigned to shared:
123 globshared1 = string_copy(local1)
124sharing4.c:34:3: Temp storage temp2 assigned to shared: globshared2 = temp2
125 sharing4.c:13:37: Storage temp2 becomes temp
80ee600a 126sharing4.c:35:3: Only storage globonly4 (type char *) not released before
127 assignment: globonly4 = temp1
885824d3 128 sharing4.c:4:20: Storage globonly4 becomes only
129sharing4.c:38:9: Shared storage shared1 passed as only param: free (shared1)
130 sharing4.c:14:26: Storage shared1 becomes shared
131sharing4.c:42:12: Only storage only3 not released before return
132 sharing4.c:12:72: Storage only3 becomes only
133sharing4.c:42:12: Function returns with global globonly3 referencing released
134 storage
16c024b5 135 sharing4.c:21:9: Storage globonly3 released
885824d3 136
11db3170 137Finished checking --- 12 code warnings, as expected
885824d3 138
139sharing5.c: (in function f)
140sharing5.c:13:4: Variable only1 used after being released
141 sharing5.c:12:9: Storage only1 released
142sharing5.c:22:5: Clauses exit with local2 referencing local storage in true
143 branch, shared storage in false branch
144 sharing5.c:21:7: Storage local2 becomes shared
145sharing5.c:24:9: Shared storage shared passed as only param (local2 aliases
146 shared): free (local2)
147 sharing5.c:5:27: Storage shared becomes shared
148sharing5.c:27:4: Dereference of possibly null pointer localp: *localp
149 sharing5.c:26:12: Storage localp may become null
80ee600a 150sharing5.c:32:3: Fresh storage localp (type char **) not released before
151 assignment: localp = &only3
16c024b5 152 sharing5.c:26:3: Fresh storage localp created
885824d3 153sharing5.c:33:2: Only storage only3 not released before return
154 sharing5.c:4:73: Storage only3 becomes only
155
11db3170 156Finished checking --- 6 code warnings, as expected
This page took 0.085387 seconds and 5 git commands to generate.