• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -verify %s
2 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist
3 // RUN: FileCheck --input-file=%t.plist %s
4 
use(int * ptr,int val)5 void use(int *ptr, int val) {
6   *ptr = val; // expected-warning {{Dereference of null pointer (loaded from variable 'ptr')}}
7   // expected-note@-1 {{Dereference of null pointer (loaded from variable 'ptr')}}
8 }
9 
compute()10 int compute() {
11   // Do something that will take enough processing to trigger trimming.
12   // FIXME: This is actually really sensitive. If the interval timing is just
13   // wrong, the node for the actual dereference may also be collected, and all
14   // the path notes will disappear. <rdar://problem/12511814>
15   return 2 + 3 + 4 + 5 + 6;
16 }
17 
testSimple()18 void testSimple() {
19   int *p = 0;
20   // expected-note@-1 {{'p' initialized to a null pointer value}}
21   use(p, compute());
22   // expected-note@-1 {{Passing null pointer value via 1st parameter 'ptr'}}
23   // expected-note@-2 {{Calling 'use'}}
24 }
25 
26 
use2(int * ptr,int val)27 void use2(int *ptr, int val) {
28   *ptr = val; // expected-warning {{Dereference of null pointer (loaded from variable 'ptr')}}
29   // expected-note@-1 {{Dereference of null pointer (loaded from variable 'ptr')}}
30 }
31 
passThrough(int * p)32 void passThrough(int *p) {
33   use2(p, compute());
34   // expected-note@-1 {{Passing null pointer value via 1st parameter 'ptr'}}
35   // expected-note@-2 {{Calling 'use2'}}
36 }
37 
testChainedCalls()38 void testChainedCalls() {
39   int *ptr = 0;
40   // expected-note@-1 {{'ptr' initialized to a null pointer value}}
41   passThrough(ptr);
42   // expected-note@-1 {{Passing null pointer value via 1st parameter 'p'}}
43   // expected-note@-2 {{Calling 'passThrough'}}
44 }
45 
46 // CHECK:  <key>diagnostics</key>
47 // CHECK-NEXT:  <array>
48 // CHECK-NEXT:   <dict>
49 // CHECK-NEXT:    <key>path</key>
50 // CHECK-NEXT:    <array>
51 // CHECK-NEXT:     <dict>
52 // CHECK-NEXT:      <key>kind</key><string>event</string>
53 // CHECK-NEXT:      <key>location</key>
54 // CHECK-NEXT:      <dict>
55 // CHECK-NEXT:       <key>line</key><integer>19</integer>
56 // CHECK-NEXT:       <key>col</key><integer>3</integer>
57 // CHECK-NEXT:       <key>file</key><integer>0</integer>
58 // CHECK-NEXT:      </dict>
59 // CHECK-NEXT:      <key>ranges</key>
60 // CHECK-NEXT:      <array>
61 // CHECK-NEXT:        <array>
62 // CHECK-NEXT:         <dict>
63 // CHECK-NEXT:          <key>line</key><integer>19</integer>
64 // CHECK-NEXT:          <key>col</key><integer>3</integer>
65 // CHECK-NEXT:          <key>file</key><integer>0</integer>
66 // CHECK-NEXT:         </dict>
67 // CHECK-NEXT:         <dict>
68 // CHECK-NEXT:          <key>line</key><integer>19</integer>
69 // CHECK-NEXT:          <key>col</key><integer>8</integer>
70 // CHECK-NEXT:          <key>file</key><integer>0</integer>
71 // CHECK-NEXT:         </dict>
72 // CHECK-NEXT:        </array>
73 // CHECK-NEXT:      </array>
74 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
75 // CHECK-NEXT:      <key>extended_message</key>
76 // CHECK-NEXT:      <string>&apos;p&apos; initialized to a null pointer value</string>
77 // CHECK-NEXT:      <key>message</key>
78 // CHECK-NEXT:      <string>&apos;p&apos; initialized to a null pointer value</string>
79 // CHECK-NEXT:     </dict>
80 // CHECK-NEXT:     <dict>
81 // CHECK-NEXT:      <key>kind</key><string>control</string>
82 // CHECK-NEXT:      <key>edges</key>
83 // CHECK-NEXT:       <array>
84 // CHECK-NEXT:        <dict>
85 // CHECK-NEXT:         <key>start</key>
86 // CHECK-NEXT:          <array>
87 // CHECK-NEXT:           <dict>
88 // CHECK-NEXT:            <key>line</key><integer>19</integer>
89 // CHECK-NEXT:            <key>col</key><integer>3</integer>
90 // CHECK-NEXT:            <key>file</key><integer>0</integer>
91 // CHECK-NEXT:           </dict>
92 // CHECK-NEXT:           <dict>
93 // CHECK-NEXT:            <key>line</key><integer>19</integer>
94 // CHECK-NEXT:            <key>col</key><integer>5</integer>
95 // CHECK-NEXT:            <key>file</key><integer>0</integer>
96 // CHECK-NEXT:           </dict>
97 // CHECK-NEXT:          </array>
98 // CHECK-NEXT:         <key>end</key>
99 // CHECK-NEXT:          <array>
100 // CHECK-NEXT:           <dict>
101 // CHECK-NEXT:            <key>line</key><integer>21</integer>
102 // CHECK-NEXT:            <key>col</key><integer>10</integer>
103 // CHECK-NEXT:            <key>file</key><integer>0</integer>
104 // CHECK-NEXT:           </dict>
105 // CHECK-NEXT:           <dict>
106 // CHECK-NEXT:            <key>line</key><integer>21</integer>
107 // CHECK-NEXT:            <key>col</key><integer>16</integer>
108 // CHECK-NEXT:            <key>file</key><integer>0</integer>
109 // CHECK-NEXT:           </dict>
110 // CHECK-NEXT:          </array>
111 // CHECK-NEXT:        </dict>
112 // CHECK-NEXT:       </array>
113 // CHECK-NEXT:     </dict>
114 // CHECK-NEXT:     <dict>
115 // CHECK-NEXT:      <key>kind</key><string>control</string>
116 // CHECK-NEXT:      <key>edges</key>
117 // CHECK-NEXT:       <array>
118 // CHECK-NEXT:        <dict>
119 // CHECK-NEXT:         <key>start</key>
120 // CHECK-NEXT:          <array>
121 // CHECK-NEXT:           <dict>
122 // CHECK-NEXT:            <key>line</key><integer>21</integer>
123 // CHECK-NEXT:            <key>col</key><integer>10</integer>
124 // CHECK-NEXT:            <key>file</key><integer>0</integer>
125 // CHECK-NEXT:           </dict>
126 // CHECK-NEXT:           <dict>
127 // CHECK-NEXT:            <key>line</key><integer>21</integer>
128 // CHECK-NEXT:            <key>col</key><integer>16</integer>
129 // CHECK-NEXT:            <key>file</key><integer>0</integer>
130 // CHECK-NEXT:           </dict>
131 // CHECK-NEXT:          </array>
132 // CHECK-NEXT:         <key>end</key>
133 // CHECK-NEXT:          <array>
134 // CHECK-NEXT:           <dict>
135 // CHECK-NEXT:            <key>line</key><integer>21</integer>
136 // CHECK-NEXT:            <key>col</key><integer>7</integer>
137 // CHECK-NEXT:            <key>file</key><integer>0</integer>
138 // CHECK-NEXT:           </dict>
139 // CHECK-NEXT:           <dict>
140 // CHECK-NEXT:            <key>line</key><integer>21</integer>
141 // CHECK-NEXT:            <key>col</key><integer>7</integer>
142 // CHECK-NEXT:            <key>file</key><integer>0</integer>
143 // CHECK-NEXT:           </dict>
144 // CHECK-NEXT:          </array>
145 // CHECK-NEXT:        </dict>
146 // CHECK-NEXT:       </array>
147 // CHECK-NEXT:     </dict>
148 // CHECK-NEXT:     <dict>
149 // CHECK-NEXT:      <key>kind</key><string>event</string>
150 // CHECK-NEXT:      <key>location</key>
151 // CHECK-NEXT:      <dict>
152 // CHECK-NEXT:       <key>line</key><integer>21</integer>
153 // CHECK-NEXT:       <key>col</key><integer>7</integer>
154 // CHECK-NEXT:       <key>file</key><integer>0</integer>
155 // CHECK-NEXT:      </dict>
156 // CHECK-NEXT:      <key>ranges</key>
157 // CHECK-NEXT:      <array>
158 // CHECK-NEXT:        <array>
159 // CHECK-NEXT:         <dict>
160 // CHECK-NEXT:          <key>line</key><integer>21</integer>
161 // CHECK-NEXT:          <key>col</key><integer>7</integer>
162 // CHECK-NEXT:          <key>file</key><integer>0</integer>
163 // CHECK-NEXT:         </dict>
164 // CHECK-NEXT:         <dict>
165 // CHECK-NEXT:          <key>line</key><integer>21</integer>
166 // CHECK-NEXT:          <key>col</key><integer>7</integer>
167 // CHECK-NEXT:          <key>file</key><integer>0</integer>
168 // CHECK-NEXT:         </dict>
169 // CHECK-NEXT:        </array>
170 // CHECK-NEXT:      </array>
171 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
172 // CHECK-NEXT:      <key>extended_message</key>
173 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;ptr&apos;</string>
174 // CHECK-NEXT:      <key>message</key>
175 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;ptr&apos;</string>
176 // CHECK-NEXT:     </dict>
177 // CHECK-NEXT:     <dict>
178 // CHECK-NEXT:      <key>kind</key><string>event</string>
179 // CHECK-NEXT:      <key>location</key>
180 // CHECK-NEXT:      <dict>
181 // CHECK-NEXT:       <key>line</key><integer>21</integer>
182 // CHECK-NEXT:       <key>col</key><integer>3</integer>
183 // CHECK-NEXT:       <key>file</key><integer>0</integer>
184 // CHECK-NEXT:      </dict>
185 // CHECK-NEXT:      <key>ranges</key>
186 // CHECK-NEXT:      <array>
187 // CHECK-NEXT:        <array>
188 // CHECK-NEXT:         <dict>
189 // CHECK-NEXT:          <key>line</key><integer>21</integer>
190 // CHECK-NEXT:          <key>col</key><integer>3</integer>
191 // CHECK-NEXT:          <key>file</key><integer>0</integer>
192 // CHECK-NEXT:         </dict>
193 // CHECK-NEXT:         <dict>
194 // CHECK-NEXT:          <key>line</key><integer>21</integer>
195 // CHECK-NEXT:          <key>col</key><integer>19</integer>
196 // CHECK-NEXT:          <key>file</key><integer>0</integer>
197 // CHECK-NEXT:         </dict>
198 // CHECK-NEXT:        </array>
199 // CHECK-NEXT:      </array>
200 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
201 // CHECK-NEXT:      <key>extended_message</key>
202 // CHECK-NEXT:      <string>Calling &apos;use&apos;</string>
203 // CHECK-NEXT:      <key>message</key>
204 // CHECK-NEXT:      <string>Calling &apos;use&apos;</string>
205 // CHECK-NEXT:     </dict>
206 // CHECK-NEXT:     <dict>
207 // CHECK-NEXT:      <key>kind</key><string>event</string>
208 // CHECK-NEXT:      <key>location</key>
209 // CHECK-NEXT:      <dict>
210 // CHECK-NEXT:       <key>line</key><integer>5</integer>
211 // CHECK-NEXT:       <key>col</key><integer>1</integer>
212 // CHECK-NEXT:       <key>file</key><integer>0</integer>
213 // CHECK-NEXT:      </dict>
214 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
215 // CHECK-NEXT:      <key>extended_message</key>
216 // CHECK-NEXT:      <string>Entered call from &apos;testSimple&apos;</string>
217 // CHECK-NEXT:      <key>message</key>
218 // CHECK-NEXT:      <string>Entered call from &apos;testSimple&apos;</string>
219 // CHECK-NEXT:     </dict>
220 // CHECK-NEXT:     <dict>
221 // CHECK-NEXT:      <key>kind</key><string>control</string>
222 // CHECK-NEXT:      <key>edges</key>
223 // CHECK-NEXT:       <array>
224 // CHECK-NEXT:        <dict>
225 // CHECK-NEXT:         <key>start</key>
226 // CHECK-NEXT:          <array>
227 // CHECK-NEXT:           <dict>
228 // CHECK-NEXT:            <key>line</key><integer>5</integer>
229 // CHECK-NEXT:            <key>col</key><integer>1</integer>
230 // CHECK-NEXT:            <key>file</key><integer>0</integer>
231 // CHECK-NEXT:           </dict>
232 // CHECK-NEXT:           <dict>
233 // CHECK-NEXT:            <key>line</key><integer>5</integer>
234 // CHECK-NEXT:            <key>col</key><integer>4</integer>
235 // CHECK-NEXT:            <key>file</key><integer>0</integer>
236 // CHECK-NEXT:           </dict>
237 // CHECK-NEXT:          </array>
238 // CHECK-NEXT:         <key>end</key>
239 // CHECK-NEXT:          <array>
240 // CHECK-NEXT:           <dict>
241 // CHECK-NEXT:            <key>line</key><integer>6</integer>
242 // CHECK-NEXT:            <key>col</key><integer>3</integer>
243 // CHECK-NEXT:            <key>file</key><integer>0</integer>
244 // CHECK-NEXT:           </dict>
245 // CHECK-NEXT:           <dict>
246 // CHECK-NEXT:            <key>line</key><integer>6</integer>
247 // CHECK-NEXT:            <key>col</key><integer>3</integer>
248 // CHECK-NEXT:            <key>file</key><integer>0</integer>
249 // CHECK-NEXT:           </dict>
250 // CHECK-NEXT:          </array>
251 // CHECK-NEXT:        </dict>
252 // CHECK-NEXT:       </array>
253 // CHECK-NEXT:     </dict>
254 // CHECK-NEXT:     <dict>
255 // CHECK-NEXT:      <key>kind</key><string>control</string>
256 // CHECK-NEXT:      <key>edges</key>
257 // CHECK-NEXT:       <array>
258 // CHECK-NEXT:        <dict>
259 // CHECK-NEXT:         <key>start</key>
260 // CHECK-NEXT:          <array>
261 // CHECK-NEXT:           <dict>
262 // CHECK-NEXT:            <key>line</key><integer>6</integer>
263 // CHECK-NEXT:            <key>col</key><integer>3</integer>
264 // CHECK-NEXT:            <key>file</key><integer>0</integer>
265 // CHECK-NEXT:           </dict>
266 // CHECK-NEXT:           <dict>
267 // CHECK-NEXT:            <key>line</key><integer>6</integer>
268 // CHECK-NEXT:            <key>col</key><integer>3</integer>
269 // CHECK-NEXT:            <key>file</key><integer>0</integer>
270 // CHECK-NEXT:           </dict>
271 // CHECK-NEXT:          </array>
272 // CHECK-NEXT:         <key>end</key>
273 // CHECK-NEXT:          <array>
274 // CHECK-NEXT:           <dict>
275 // CHECK-NEXT:            <key>line</key><integer>6</integer>
276 // CHECK-NEXT:            <key>col</key><integer>8</integer>
277 // CHECK-NEXT:            <key>file</key><integer>0</integer>
278 // CHECK-NEXT:           </dict>
279 // CHECK-NEXT:           <dict>
280 // CHECK-NEXT:            <key>line</key><integer>6</integer>
281 // CHECK-NEXT:            <key>col</key><integer>8</integer>
282 // CHECK-NEXT:            <key>file</key><integer>0</integer>
283 // CHECK-NEXT:           </dict>
284 // CHECK-NEXT:          </array>
285 // CHECK-NEXT:        </dict>
286 // CHECK-NEXT:       </array>
287 // CHECK-NEXT:     </dict>
288 // CHECK-NEXT:     <dict>
289 // CHECK-NEXT:      <key>kind</key><string>event</string>
290 // CHECK-NEXT:      <key>location</key>
291 // CHECK-NEXT:      <dict>
292 // CHECK-NEXT:       <key>line</key><integer>6</integer>
293 // CHECK-NEXT:       <key>col</key><integer>8</integer>
294 // CHECK-NEXT:       <key>file</key><integer>0</integer>
295 // CHECK-NEXT:      </dict>
296 // CHECK-NEXT:      <key>ranges</key>
297 // CHECK-NEXT:      <array>
298 // CHECK-NEXT:        <array>
299 // CHECK-NEXT:         <dict>
300 // CHECK-NEXT:          <key>line</key><integer>6</integer>
301 // CHECK-NEXT:          <key>col</key><integer>4</integer>
302 // CHECK-NEXT:          <key>file</key><integer>0</integer>
303 // CHECK-NEXT:         </dict>
304 // CHECK-NEXT:         <dict>
305 // CHECK-NEXT:          <key>line</key><integer>6</integer>
306 // CHECK-NEXT:          <key>col</key><integer>6</integer>
307 // CHECK-NEXT:          <key>file</key><integer>0</integer>
308 // CHECK-NEXT:         </dict>
309 // CHECK-NEXT:        </array>
310 // CHECK-NEXT:      </array>
311 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
312 // CHECK-NEXT:      <key>extended_message</key>
313 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
314 // CHECK-NEXT:      <key>message</key>
315 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
316 // CHECK-NEXT:     </dict>
317 // CHECK-NEXT:    </array>
318 // CHECK-NEXT:    <key>description</key><string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
319 // CHECK-NEXT:    <key>category</key><string>Logic error</string>
320 // CHECK-NEXT:    <key>type</key><string>Dereference of null pointer</string>
321 // CHECK-NEXT:    <key>check_name</key><string>core.NullDereference</string>
322 // CHECK-NEXT:    <!-- This hash is experimental and going to change! -->
323 // CHECK-NEXT:    <key>issue_hash_content_of_line_in_context</key><string>5c273b7f0421359833fde3f06e8a5c07</string>
324 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
325 // CHECK-NEXT:   <key>issue_context</key><string>use</string>
326 // CHECK-NEXT:   <key>issue_hash_function_offset</key><string>1</string>
327 // CHECK-NEXT:   <key>location</key>
328 // CHECK-NEXT:   <dict>
329 // CHECK-NEXT:    <key>line</key><integer>6</integer>
330 // CHECK-NEXT:    <key>col</key><integer>8</integer>
331 // CHECK-NEXT:    <key>file</key><integer>0</integer>
332 // CHECK-NEXT:   </dict>
333 // CHECK-NEXT:   </dict>
334 // CHECK-NEXT:   <dict>
335 // CHECK-NEXT:    <key>path</key>
336 // CHECK-NEXT:    <array>
337 // CHECK-NEXT:     <dict>
338 // CHECK-NEXT:      <key>kind</key><string>event</string>
339 // CHECK-NEXT:      <key>location</key>
340 // CHECK-NEXT:      <dict>
341 // CHECK-NEXT:       <key>line</key><integer>39</integer>
342 // CHECK-NEXT:       <key>col</key><integer>3</integer>
343 // CHECK-NEXT:       <key>file</key><integer>0</integer>
344 // CHECK-NEXT:      </dict>
345 // CHECK-NEXT:      <key>ranges</key>
346 // CHECK-NEXT:      <array>
347 // CHECK-NEXT:        <array>
348 // CHECK-NEXT:         <dict>
349 // CHECK-NEXT:          <key>line</key><integer>39</integer>
350 // CHECK-NEXT:          <key>col</key><integer>3</integer>
351 // CHECK-NEXT:          <key>file</key><integer>0</integer>
352 // CHECK-NEXT:         </dict>
353 // CHECK-NEXT:         <dict>
354 // CHECK-NEXT:          <key>line</key><integer>39</integer>
355 // CHECK-NEXT:          <key>col</key><integer>10</integer>
356 // CHECK-NEXT:          <key>file</key><integer>0</integer>
357 // CHECK-NEXT:         </dict>
358 // CHECK-NEXT:        </array>
359 // CHECK-NEXT:      </array>
360 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
361 // CHECK-NEXT:      <key>extended_message</key>
362 // CHECK-NEXT:      <string>&apos;ptr&apos; initialized to a null pointer value</string>
363 // CHECK-NEXT:      <key>message</key>
364 // CHECK-NEXT:      <string>&apos;ptr&apos; initialized to a null pointer value</string>
365 // CHECK-NEXT:     </dict>
366 // CHECK-NEXT:     <dict>
367 // CHECK-NEXT:      <key>kind</key><string>control</string>
368 // CHECK-NEXT:      <key>edges</key>
369 // CHECK-NEXT:       <array>
370 // CHECK-NEXT:        <dict>
371 // CHECK-NEXT:         <key>start</key>
372 // CHECK-NEXT:          <array>
373 // CHECK-NEXT:           <dict>
374 // CHECK-NEXT:            <key>line</key><integer>39</integer>
375 // CHECK-NEXT:            <key>col</key><integer>3</integer>
376 // CHECK-NEXT:            <key>file</key><integer>0</integer>
377 // CHECK-NEXT:           </dict>
378 // CHECK-NEXT:           <dict>
379 // CHECK-NEXT:            <key>line</key><integer>39</integer>
380 // CHECK-NEXT:            <key>col</key><integer>5</integer>
381 // CHECK-NEXT:            <key>file</key><integer>0</integer>
382 // CHECK-NEXT:           </dict>
383 // CHECK-NEXT:          </array>
384 // CHECK-NEXT:         <key>end</key>
385 // CHECK-NEXT:          <array>
386 // CHECK-NEXT:           <dict>
387 // CHECK-NEXT:            <key>line</key><integer>41</integer>
388 // CHECK-NEXT:            <key>col</key><integer>3</integer>
389 // CHECK-NEXT:            <key>file</key><integer>0</integer>
390 // CHECK-NEXT:           </dict>
391 // CHECK-NEXT:           <dict>
392 // CHECK-NEXT:            <key>line</key><integer>41</integer>
393 // CHECK-NEXT:            <key>col</key><integer>13</integer>
394 // CHECK-NEXT:            <key>file</key><integer>0</integer>
395 // CHECK-NEXT:           </dict>
396 // CHECK-NEXT:          </array>
397 // CHECK-NEXT:        </dict>
398 // CHECK-NEXT:       </array>
399 // CHECK-NEXT:     </dict>
400 // CHECK-NEXT:     <dict>
401 // CHECK-NEXT:      <key>kind</key><string>control</string>
402 // CHECK-NEXT:      <key>edges</key>
403 // CHECK-NEXT:       <array>
404 // CHECK-NEXT:        <dict>
405 // CHECK-NEXT:         <key>start</key>
406 // CHECK-NEXT:          <array>
407 // CHECK-NEXT:           <dict>
408 // CHECK-NEXT:            <key>line</key><integer>41</integer>
409 // CHECK-NEXT:            <key>col</key><integer>3</integer>
410 // CHECK-NEXT:            <key>file</key><integer>0</integer>
411 // CHECK-NEXT:           </dict>
412 // CHECK-NEXT:           <dict>
413 // CHECK-NEXT:            <key>line</key><integer>41</integer>
414 // CHECK-NEXT:            <key>col</key><integer>13</integer>
415 // CHECK-NEXT:            <key>file</key><integer>0</integer>
416 // CHECK-NEXT:           </dict>
417 // CHECK-NEXT:          </array>
418 // CHECK-NEXT:         <key>end</key>
419 // CHECK-NEXT:          <array>
420 // CHECK-NEXT:           <dict>
421 // CHECK-NEXT:            <key>line</key><integer>41</integer>
422 // CHECK-NEXT:            <key>col</key><integer>15</integer>
423 // CHECK-NEXT:            <key>file</key><integer>0</integer>
424 // CHECK-NEXT:           </dict>
425 // CHECK-NEXT:           <dict>
426 // CHECK-NEXT:            <key>line</key><integer>41</integer>
427 // CHECK-NEXT:            <key>col</key><integer>17</integer>
428 // CHECK-NEXT:            <key>file</key><integer>0</integer>
429 // CHECK-NEXT:           </dict>
430 // CHECK-NEXT:          </array>
431 // CHECK-NEXT:        </dict>
432 // CHECK-NEXT:       </array>
433 // CHECK-NEXT:     </dict>
434 // CHECK-NEXT:     <dict>
435 // CHECK-NEXT:      <key>kind</key><string>event</string>
436 // CHECK-NEXT:      <key>location</key>
437 // CHECK-NEXT:      <dict>
438 // CHECK-NEXT:       <key>line</key><integer>41</integer>
439 // CHECK-NEXT:       <key>col</key><integer>15</integer>
440 // CHECK-NEXT:       <key>file</key><integer>0</integer>
441 // CHECK-NEXT:      </dict>
442 // CHECK-NEXT:      <key>ranges</key>
443 // CHECK-NEXT:      <array>
444 // CHECK-NEXT:        <array>
445 // CHECK-NEXT:         <dict>
446 // CHECK-NEXT:          <key>line</key><integer>41</integer>
447 // CHECK-NEXT:          <key>col</key><integer>15</integer>
448 // CHECK-NEXT:          <key>file</key><integer>0</integer>
449 // CHECK-NEXT:         </dict>
450 // CHECK-NEXT:         <dict>
451 // CHECK-NEXT:          <key>line</key><integer>41</integer>
452 // CHECK-NEXT:          <key>col</key><integer>17</integer>
453 // CHECK-NEXT:          <key>file</key><integer>0</integer>
454 // CHECK-NEXT:         </dict>
455 // CHECK-NEXT:        </array>
456 // CHECK-NEXT:      </array>
457 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
458 // CHECK-NEXT:      <key>extended_message</key>
459 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;p&apos;</string>
460 // CHECK-NEXT:      <key>message</key>
461 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;p&apos;</string>
462 // CHECK-NEXT:     </dict>
463 // CHECK-NEXT:     <dict>
464 // CHECK-NEXT:      <key>kind</key><string>event</string>
465 // CHECK-NEXT:      <key>location</key>
466 // CHECK-NEXT:      <dict>
467 // CHECK-NEXT:       <key>line</key><integer>41</integer>
468 // CHECK-NEXT:       <key>col</key><integer>3</integer>
469 // CHECK-NEXT:       <key>file</key><integer>0</integer>
470 // CHECK-NEXT:      </dict>
471 // CHECK-NEXT:      <key>ranges</key>
472 // CHECK-NEXT:      <array>
473 // CHECK-NEXT:        <array>
474 // CHECK-NEXT:         <dict>
475 // CHECK-NEXT:          <key>line</key><integer>41</integer>
476 // CHECK-NEXT:          <key>col</key><integer>3</integer>
477 // CHECK-NEXT:          <key>file</key><integer>0</integer>
478 // CHECK-NEXT:         </dict>
479 // CHECK-NEXT:         <dict>
480 // CHECK-NEXT:          <key>line</key><integer>41</integer>
481 // CHECK-NEXT:          <key>col</key><integer>18</integer>
482 // CHECK-NEXT:          <key>file</key><integer>0</integer>
483 // CHECK-NEXT:         </dict>
484 // CHECK-NEXT:        </array>
485 // CHECK-NEXT:      </array>
486 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
487 // CHECK-NEXT:      <key>extended_message</key>
488 // CHECK-NEXT:      <string>Calling &apos;passThrough&apos;</string>
489 // CHECK-NEXT:      <key>message</key>
490 // CHECK-NEXT:      <string>Calling &apos;passThrough&apos;</string>
491 // CHECK-NEXT:     </dict>
492 // CHECK-NEXT:     <dict>
493 // CHECK-NEXT:      <key>kind</key><string>event</string>
494 // CHECK-NEXT:      <key>location</key>
495 // CHECK-NEXT:      <dict>
496 // CHECK-NEXT:       <key>line</key><integer>32</integer>
497 // CHECK-NEXT:       <key>col</key><integer>1</integer>
498 // CHECK-NEXT:       <key>file</key><integer>0</integer>
499 // CHECK-NEXT:      </dict>
500 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
501 // CHECK-NEXT:      <key>extended_message</key>
502 // CHECK-NEXT:      <string>Entered call from &apos;testChainedCalls&apos;</string>
503 // CHECK-NEXT:      <key>message</key>
504 // CHECK-NEXT:      <string>Entered call from &apos;testChainedCalls&apos;</string>
505 // CHECK-NEXT:     </dict>
506 // CHECK-NEXT:     <dict>
507 // CHECK-NEXT:      <key>kind</key><string>control</string>
508 // CHECK-NEXT:      <key>edges</key>
509 // CHECK-NEXT:       <array>
510 // CHECK-NEXT:        <dict>
511 // CHECK-NEXT:         <key>start</key>
512 // CHECK-NEXT:          <array>
513 // CHECK-NEXT:           <dict>
514 // CHECK-NEXT:            <key>line</key><integer>32</integer>
515 // CHECK-NEXT:            <key>col</key><integer>1</integer>
516 // CHECK-NEXT:            <key>file</key><integer>0</integer>
517 // CHECK-NEXT:           </dict>
518 // CHECK-NEXT:           <dict>
519 // CHECK-NEXT:            <key>line</key><integer>32</integer>
520 // CHECK-NEXT:            <key>col</key><integer>4</integer>
521 // CHECK-NEXT:            <key>file</key><integer>0</integer>
522 // CHECK-NEXT:           </dict>
523 // CHECK-NEXT:          </array>
524 // CHECK-NEXT:         <key>end</key>
525 // CHECK-NEXT:          <array>
526 // CHECK-NEXT:           <dict>
527 // CHECK-NEXT:            <key>line</key><integer>33</integer>
528 // CHECK-NEXT:            <key>col</key><integer>3</integer>
529 // CHECK-NEXT:            <key>file</key><integer>0</integer>
530 // CHECK-NEXT:           </dict>
531 // CHECK-NEXT:           <dict>
532 // CHECK-NEXT:            <key>line</key><integer>33</integer>
533 // CHECK-NEXT:            <key>col</key><integer>6</integer>
534 // CHECK-NEXT:            <key>file</key><integer>0</integer>
535 // CHECK-NEXT:           </dict>
536 // CHECK-NEXT:          </array>
537 // CHECK-NEXT:        </dict>
538 // CHECK-NEXT:       </array>
539 // CHECK-NEXT:     </dict>
540 // CHECK-NEXT:     <dict>
541 // CHECK-NEXT:      <key>kind</key><string>control</string>
542 // CHECK-NEXT:      <key>edges</key>
543 // CHECK-NEXT:       <array>
544 // CHECK-NEXT:        <dict>
545 // CHECK-NEXT:         <key>start</key>
546 // CHECK-NEXT:          <array>
547 // CHECK-NEXT:           <dict>
548 // CHECK-NEXT:            <key>line</key><integer>33</integer>
549 // CHECK-NEXT:            <key>col</key><integer>3</integer>
550 // CHECK-NEXT:            <key>file</key><integer>0</integer>
551 // CHECK-NEXT:           </dict>
552 // CHECK-NEXT:           <dict>
553 // CHECK-NEXT:            <key>line</key><integer>33</integer>
554 // CHECK-NEXT:            <key>col</key><integer>6</integer>
555 // CHECK-NEXT:            <key>file</key><integer>0</integer>
556 // CHECK-NEXT:           </dict>
557 // CHECK-NEXT:          </array>
558 // CHECK-NEXT:         <key>end</key>
559 // CHECK-NEXT:          <array>
560 // CHECK-NEXT:           <dict>
561 // CHECK-NEXT:            <key>line</key><integer>33</integer>
562 // CHECK-NEXT:            <key>col</key><integer>11</integer>
563 // CHECK-NEXT:            <key>file</key><integer>0</integer>
564 // CHECK-NEXT:           </dict>
565 // CHECK-NEXT:           <dict>
566 // CHECK-NEXT:            <key>line</key><integer>33</integer>
567 // CHECK-NEXT:            <key>col</key><integer>17</integer>
568 // CHECK-NEXT:            <key>file</key><integer>0</integer>
569 // CHECK-NEXT:           </dict>
570 // CHECK-NEXT:          </array>
571 // CHECK-NEXT:        </dict>
572 // CHECK-NEXT:       </array>
573 // CHECK-NEXT:     </dict>
574 // CHECK-NEXT:     <dict>
575 // CHECK-NEXT:      <key>kind</key><string>control</string>
576 // CHECK-NEXT:      <key>edges</key>
577 // CHECK-NEXT:       <array>
578 // CHECK-NEXT:        <dict>
579 // CHECK-NEXT:         <key>start</key>
580 // CHECK-NEXT:          <array>
581 // CHECK-NEXT:           <dict>
582 // CHECK-NEXT:            <key>line</key><integer>33</integer>
583 // CHECK-NEXT:            <key>col</key><integer>11</integer>
584 // CHECK-NEXT:            <key>file</key><integer>0</integer>
585 // CHECK-NEXT:           </dict>
586 // CHECK-NEXT:           <dict>
587 // CHECK-NEXT:            <key>line</key><integer>33</integer>
588 // CHECK-NEXT:            <key>col</key><integer>17</integer>
589 // CHECK-NEXT:            <key>file</key><integer>0</integer>
590 // CHECK-NEXT:           </dict>
591 // CHECK-NEXT:          </array>
592 // CHECK-NEXT:         <key>end</key>
593 // CHECK-NEXT:          <array>
594 // CHECK-NEXT:           <dict>
595 // CHECK-NEXT:            <key>line</key><integer>33</integer>
596 // CHECK-NEXT:            <key>col</key><integer>8</integer>
597 // CHECK-NEXT:            <key>file</key><integer>0</integer>
598 // CHECK-NEXT:           </dict>
599 // CHECK-NEXT:           <dict>
600 // CHECK-NEXT:            <key>line</key><integer>33</integer>
601 // CHECK-NEXT:            <key>col</key><integer>8</integer>
602 // CHECK-NEXT:            <key>file</key><integer>0</integer>
603 // CHECK-NEXT:           </dict>
604 // CHECK-NEXT:          </array>
605 // CHECK-NEXT:        </dict>
606 // CHECK-NEXT:       </array>
607 // CHECK-NEXT:     </dict>
608 // CHECK-NEXT:     <dict>
609 // CHECK-NEXT:      <key>kind</key><string>event</string>
610 // CHECK-NEXT:      <key>location</key>
611 // CHECK-NEXT:      <dict>
612 // CHECK-NEXT:       <key>line</key><integer>33</integer>
613 // CHECK-NEXT:       <key>col</key><integer>8</integer>
614 // CHECK-NEXT:       <key>file</key><integer>0</integer>
615 // CHECK-NEXT:      </dict>
616 // CHECK-NEXT:      <key>ranges</key>
617 // CHECK-NEXT:      <array>
618 // CHECK-NEXT:        <array>
619 // CHECK-NEXT:         <dict>
620 // CHECK-NEXT:          <key>line</key><integer>33</integer>
621 // CHECK-NEXT:          <key>col</key><integer>8</integer>
622 // CHECK-NEXT:          <key>file</key><integer>0</integer>
623 // CHECK-NEXT:         </dict>
624 // CHECK-NEXT:         <dict>
625 // CHECK-NEXT:          <key>line</key><integer>33</integer>
626 // CHECK-NEXT:          <key>col</key><integer>8</integer>
627 // CHECK-NEXT:          <key>file</key><integer>0</integer>
628 // CHECK-NEXT:         </dict>
629 // CHECK-NEXT:        </array>
630 // CHECK-NEXT:      </array>
631 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
632 // CHECK-NEXT:      <key>extended_message</key>
633 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;ptr&apos;</string>
634 // CHECK-NEXT:      <key>message</key>
635 // CHECK-NEXT:      <string>Passing null pointer value via 1st parameter &apos;ptr&apos;</string>
636 // CHECK-NEXT:     </dict>
637 // CHECK-NEXT:     <dict>
638 // CHECK-NEXT:      <key>kind</key><string>event</string>
639 // CHECK-NEXT:      <key>location</key>
640 // CHECK-NEXT:      <dict>
641 // CHECK-NEXT:       <key>line</key><integer>33</integer>
642 // CHECK-NEXT:       <key>col</key><integer>3</integer>
643 // CHECK-NEXT:       <key>file</key><integer>0</integer>
644 // CHECK-NEXT:      </dict>
645 // CHECK-NEXT:      <key>ranges</key>
646 // CHECK-NEXT:      <array>
647 // CHECK-NEXT:        <array>
648 // CHECK-NEXT:         <dict>
649 // CHECK-NEXT:          <key>line</key><integer>33</integer>
650 // CHECK-NEXT:          <key>col</key><integer>3</integer>
651 // CHECK-NEXT:          <key>file</key><integer>0</integer>
652 // CHECK-NEXT:         </dict>
653 // CHECK-NEXT:         <dict>
654 // CHECK-NEXT:          <key>line</key><integer>33</integer>
655 // CHECK-NEXT:          <key>col</key><integer>20</integer>
656 // CHECK-NEXT:          <key>file</key><integer>0</integer>
657 // CHECK-NEXT:         </dict>
658 // CHECK-NEXT:        </array>
659 // CHECK-NEXT:      </array>
660 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
661 // CHECK-NEXT:      <key>extended_message</key>
662 // CHECK-NEXT:      <string>Calling &apos;use2&apos;</string>
663 // CHECK-NEXT:      <key>message</key>
664 // CHECK-NEXT:      <string>Calling &apos;use2&apos;</string>
665 // CHECK-NEXT:     </dict>
666 // CHECK-NEXT:     <dict>
667 // CHECK-NEXT:      <key>kind</key><string>event</string>
668 // CHECK-NEXT:      <key>location</key>
669 // CHECK-NEXT:      <dict>
670 // CHECK-NEXT:       <key>line</key><integer>27</integer>
671 // CHECK-NEXT:       <key>col</key><integer>1</integer>
672 // CHECK-NEXT:       <key>file</key><integer>0</integer>
673 // CHECK-NEXT:      </dict>
674 // CHECK-NEXT:      <key>depth</key><integer>2</integer>
675 // CHECK-NEXT:      <key>extended_message</key>
676 // CHECK-NEXT:      <string>Entered call from &apos;passThrough&apos;</string>
677 // CHECK-NEXT:      <key>message</key>
678 // CHECK-NEXT:      <string>Entered call from &apos;passThrough&apos;</string>
679 // CHECK-NEXT:     </dict>
680 // CHECK-NEXT:     <dict>
681 // CHECK-NEXT:      <key>kind</key><string>control</string>
682 // CHECK-NEXT:      <key>edges</key>
683 // CHECK-NEXT:       <array>
684 // CHECK-NEXT:        <dict>
685 // CHECK-NEXT:         <key>start</key>
686 // CHECK-NEXT:          <array>
687 // CHECK-NEXT:           <dict>
688 // CHECK-NEXT:            <key>line</key><integer>27</integer>
689 // CHECK-NEXT:            <key>col</key><integer>1</integer>
690 // CHECK-NEXT:            <key>file</key><integer>0</integer>
691 // CHECK-NEXT:           </dict>
692 // CHECK-NEXT:           <dict>
693 // CHECK-NEXT:            <key>line</key><integer>27</integer>
694 // CHECK-NEXT:            <key>col</key><integer>4</integer>
695 // CHECK-NEXT:            <key>file</key><integer>0</integer>
696 // CHECK-NEXT:           </dict>
697 // CHECK-NEXT:          </array>
698 // CHECK-NEXT:         <key>end</key>
699 // CHECK-NEXT:          <array>
700 // CHECK-NEXT:           <dict>
701 // CHECK-NEXT:            <key>line</key><integer>28</integer>
702 // CHECK-NEXT:            <key>col</key><integer>3</integer>
703 // CHECK-NEXT:            <key>file</key><integer>0</integer>
704 // CHECK-NEXT:           </dict>
705 // CHECK-NEXT:           <dict>
706 // CHECK-NEXT:            <key>line</key><integer>28</integer>
707 // CHECK-NEXT:            <key>col</key><integer>3</integer>
708 // CHECK-NEXT:            <key>file</key><integer>0</integer>
709 // CHECK-NEXT:           </dict>
710 // CHECK-NEXT:          </array>
711 // CHECK-NEXT:        </dict>
712 // CHECK-NEXT:       </array>
713 // CHECK-NEXT:     </dict>
714 // CHECK-NEXT:     <dict>
715 // CHECK-NEXT:      <key>kind</key><string>control</string>
716 // CHECK-NEXT:      <key>edges</key>
717 // CHECK-NEXT:       <array>
718 // CHECK-NEXT:        <dict>
719 // CHECK-NEXT:         <key>start</key>
720 // CHECK-NEXT:          <array>
721 // CHECK-NEXT:           <dict>
722 // CHECK-NEXT:            <key>line</key><integer>28</integer>
723 // CHECK-NEXT:            <key>col</key><integer>3</integer>
724 // CHECK-NEXT:            <key>file</key><integer>0</integer>
725 // CHECK-NEXT:           </dict>
726 // CHECK-NEXT:           <dict>
727 // CHECK-NEXT:            <key>line</key><integer>28</integer>
728 // CHECK-NEXT:            <key>col</key><integer>3</integer>
729 // CHECK-NEXT:            <key>file</key><integer>0</integer>
730 // CHECK-NEXT:           </dict>
731 // CHECK-NEXT:          </array>
732 // CHECK-NEXT:         <key>end</key>
733 // CHECK-NEXT:          <array>
734 // CHECK-NEXT:           <dict>
735 // CHECK-NEXT:            <key>line</key><integer>28</integer>
736 // CHECK-NEXT:            <key>col</key><integer>8</integer>
737 // CHECK-NEXT:            <key>file</key><integer>0</integer>
738 // CHECK-NEXT:           </dict>
739 // CHECK-NEXT:           <dict>
740 // CHECK-NEXT:            <key>line</key><integer>28</integer>
741 // CHECK-NEXT:            <key>col</key><integer>8</integer>
742 // CHECK-NEXT:            <key>file</key><integer>0</integer>
743 // CHECK-NEXT:           </dict>
744 // CHECK-NEXT:          </array>
745 // CHECK-NEXT:        </dict>
746 // CHECK-NEXT:       </array>
747 // CHECK-NEXT:     </dict>
748 // CHECK-NEXT:     <dict>
749 // CHECK-NEXT:      <key>kind</key><string>event</string>
750 // CHECK-NEXT:      <key>location</key>
751 // CHECK-NEXT:      <dict>
752 // CHECK-NEXT:       <key>line</key><integer>28</integer>
753 // CHECK-NEXT:       <key>col</key><integer>8</integer>
754 // CHECK-NEXT:       <key>file</key><integer>0</integer>
755 // CHECK-NEXT:      </dict>
756 // CHECK-NEXT:      <key>ranges</key>
757 // CHECK-NEXT:      <array>
758 // CHECK-NEXT:        <array>
759 // CHECK-NEXT:         <dict>
760 // CHECK-NEXT:          <key>line</key><integer>28</integer>
761 // CHECK-NEXT:          <key>col</key><integer>4</integer>
762 // CHECK-NEXT:          <key>file</key><integer>0</integer>
763 // CHECK-NEXT:         </dict>
764 // CHECK-NEXT:         <dict>
765 // CHECK-NEXT:          <key>line</key><integer>28</integer>
766 // CHECK-NEXT:          <key>col</key><integer>6</integer>
767 // CHECK-NEXT:          <key>file</key><integer>0</integer>
768 // CHECK-NEXT:         </dict>
769 // CHECK-NEXT:        </array>
770 // CHECK-NEXT:      </array>
771 // CHECK-NEXT:      <key>depth</key><integer>2</integer>
772 // CHECK-NEXT:      <key>extended_message</key>
773 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
774 // CHECK-NEXT:      <key>message</key>
775 // CHECK-NEXT:      <string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
776 // CHECK-NEXT:     </dict>
777 // CHECK-NEXT:    </array>
778 // CHECK-NEXT:    <key>description</key><string>Dereference of null pointer (loaded from variable &apos;ptr&apos;)</string>
779 // CHECK-NEXT:    <key>category</key><string>Logic error</string>
780 // CHECK-NEXT:    <key>type</key><string>Dereference of null pointer</string>
781 // CHECK-NEXT:    <key>check_name</key><string>core.NullDereference</string>
782 // CHECK-NEXT:    <!-- This hash is experimental and going to change! -->
783 // CHECK-NEXT:    <key>issue_hash_content_of_line_in_context</key><string>1d1fa98a8e9fbfa90777dac9fc2795a8</string>
784 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
785 // CHECK-NEXT:   <key>issue_context</key><string>use2</string>
786 // CHECK-NEXT:   <key>issue_hash_function_offset</key><string>1</string>
787 // CHECK-NEXT:   <key>location</key>
788 // CHECK-NEXT:   <dict>
789 // CHECK-NEXT:    <key>line</key><integer>28</integer>
790 // CHECK-NEXT:    <key>col</key><integer>8</integer>
791 // CHECK-NEXT:    <key>file</key><integer>0</integer>
792 // CHECK-NEXT:   </dict>
793 // CHECK-NEXT:   </dict>
794 // CHECK-NEXT:  </array>
795