• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s
2 // RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false %s -o %t.plist
3 // RUN: FileCheck --input-file=%t.plist %s
4 
test()5 void test() {
6   int *p = new int;
7   // expected-note@-1 {{Memory is allocated}}
8   if (p)
9     // expected-note@-1 {{Taking true branch}}
10     delete p;
11     // expected-note@-1 {{Memory is released}}
12 
13   delete p; // expected-warning {{Attempt to free released memory}}
14   // expected-note@-1 {{Attempt to free released memory}}
15 }
16 
17 struct Odd {
killOdd18 	void kill() {
19 		delete this; // expected-note {{Memory is released}}
20 	}
21 };
22 
test(Odd * odd)23 void test(Odd *odd) {
24 	odd->kill(); // expected-note{{Calling 'Odd::kill'}}
25                // expected-note@-1 {{Returning; memory was released}}
26 	delete odd; // expected-warning {{Attempt to free released memory}}
27               // expected-note@-1 {{Attempt to free released memory}}
28 }
29 
30 // CHECK:  <key>diagnostics</key>
31 // CHECK-NEXT:  <array>
32 // CHECK-NEXT:   <dict>
33 // CHECK-NEXT:    <key>path</key>
34 // CHECK-NEXT:    <array>
35 // CHECK-NEXT:     <dict>
36 // CHECK-NEXT:      <key>kind</key><string>control</string>
37 // CHECK-NEXT:      <key>edges</key>
38 // CHECK-NEXT:       <array>
39 // CHECK-NEXT:        <dict>
40 // CHECK-NEXT:         <key>start</key>
41 // CHECK-NEXT:          <array>
42 // CHECK-NEXT:           <dict>
43 // CHECK-NEXT:            <key>line</key><integer>6</integer>
44 // CHECK-NEXT:            <key>col</key><integer>3</integer>
45 // CHECK-NEXT:            <key>file</key><integer>0</integer>
46 // CHECK-NEXT:           </dict>
47 // CHECK-NEXT:           <dict>
48 // CHECK-NEXT:            <key>line</key><integer>6</integer>
49 // CHECK-NEXT:            <key>col</key><integer>5</integer>
50 // CHECK-NEXT:            <key>file</key><integer>0</integer>
51 // CHECK-NEXT:           </dict>
52 // CHECK-NEXT:          </array>
53 // CHECK-NEXT:         <key>end</key>
54 // CHECK-NEXT:          <array>
55 // CHECK-NEXT:           <dict>
56 // CHECK-NEXT:            <key>line</key><integer>6</integer>
57 // CHECK-NEXT:            <key>col</key><integer>12</integer>
58 // CHECK-NEXT:            <key>file</key><integer>0</integer>
59 // CHECK-NEXT:           </dict>
60 // CHECK-NEXT:           <dict>
61 // CHECK-NEXT:            <key>line</key><integer>6</integer>
62 // CHECK-NEXT:            <key>col</key><integer>14</integer>
63 // CHECK-NEXT:            <key>file</key><integer>0</integer>
64 // CHECK-NEXT:           </dict>
65 // CHECK-NEXT:          </array>
66 // CHECK-NEXT:        </dict>
67 // CHECK-NEXT:       </array>
68 // CHECK-NEXT:     </dict>
69 // CHECK-NEXT:     <dict>
70 // CHECK-NEXT:      <key>kind</key><string>event</string>
71 // CHECK-NEXT:      <key>location</key>
72 // CHECK-NEXT:      <dict>
73 // CHECK-NEXT:       <key>line</key><integer>6</integer>
74 // CHECK-NEXT:       <key>col</key><integer>12</integer>
75 // CHECK-NEXT:       <key>file</key><integer>0</integer>
76 // CHECK-NEXT:      </dict>
77 // CHECK-NEXT:      <key>ranges</key>
78 // CHECK-NEXT:      <array>
79 // CHECK-NEXT:        <array>
80 // CHECK-NEXT:         <dict>
81 // CHECK-NEXT:          <key>line</key><integer>6</integer>
82 // CHECK-NEXT:          <key>col</key><integer>12</integer>
83 // CHECK-NEXT:          <key>file</key><integer>0</integer>
84 // CHECK-NEXT:         </dict>
85 // CHECK-NEXT:         <dict>
86 // CHECK-NEXT:          <key>line</key><integer>6</integer>
87 // CHECK-NEXT:          <key>col</key><integer>18</integer>
88 // CHECK-NEXT:          <key>file</key><integer>0</integer>
89 // CHECK-NEXT:         </dict>
90 // CHECK-NEXT:        </array>
91 // CHECK-NEXT:      </array>
92 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
93 // CHECK-NEXT:      <key>extended_message</key>
94 // CHECK-NEXT:      <string>Memory is allocated</string>
95 // CHECK-NEXT:      <key>message</key>
96 // CHECK-NEXT:      <string>Memory is allocated</string>
97 // CHECK-NEXT:     </dict>
98 // CHECK-NEXT:     <dict>
99 // CHECK-NEXT:      <key>kind</key><string>control</string>
100 // CHECK-NEXT:      <key>edges</key>
101 // CHECK-NEXT:       <array>
102 // CHECK-NEXT:        <dict>
103 // CHECK-NEXT:         <key>start</key>
104 // CHECK-NEXT:          <array>
105 // CHECK-NEXT:           <dict>
106 // CHECK-NEXT:            <key>line</key><integer>6</integer>
107 // CHECK-NEXT:            <key>col</key><integer>12</integer>
108 // CHECK-NEXT:            <key>file</key><integer>0</integer>
109 // CHECK-NEXT:           </dict>
110 // CHECK-NEXT:           <dict>
111 // CHECK-NEXT:            <key>line</key><integer>6</integer>
112 // CHECK-NEXT:            <key>col</key><integer>14</integer>
113 // CHECK-NEXT:            <key>file</key><integer>0</integer>
114 // CHECK-NEXT:           </dict>
115 // CHECK-NEXT:          </array>
116 // CHECK-NEXT:         <key>end</key>
117 // CHECK-NEXT:          <array>
118 // CHECK-NEXT:           <dict>
119 // CHECK-NEXT:            <key>line</key><integer>8</integer>
120 // CHECK-NEXT:            <key>col</key><integer>3</integer>
121 // CHECK-NEXT:            <key>file</key><integer>0</integer>
122 // CHECK-NEXT:           </dict>
123 // CHECK-NEXT:           <dict>
124 // CHECK-NEXT:            <key>line</key><integer>8</integer>
125 // CHECK-NEXT:            <key>col</key><integer>4</integer>
126 // CHECK-NEXT:            <key>file</key><integer>0</integer>
127 // CHECK-NEXT:           </dict>
128 // CHECK-NEXT:          </array>
129 // CHECK-NEXT:        </dict>
130 // CHECK-NEXT:       </array>
131 // CHECK-NEXT:     </dict>
132 // CHECK-NEXT:     <dict>
133 // CHECK-NEXT:      <key>kind</key><string>control</string>
134 // CHECK-NEXT:      <key>edges</key>
135 // CHECK-NEXT:       <array>
136 // CHECK-NEXT:        <dict>
137 // CHECK-NEXT:         <key>start</key>
138 // CHECK-NEXT:          <array>
139 // CHECK-NEXT:           <dict>
140 // CHECK-NEXT:            <key>line</key><integer>8</integer>
141 // CHECK-NEXT:            <key>col</key><integer>3</integer>
142 // CHECK-NEXT:            <key>file</key><integer>0</integer>
143 // CHECK-NEXT:           </dict>
144 // CHECK-NEXT:           <dict>
145 // CHECK-NEXT:            <key>line</key><integer>8</integer>
146 // CHECK-NEXT:            <key>col</key><integer>4</integer>
147 // CHECK-NEXT:            <key>file</key><integer>0</integer>
148 // CHECK-NEXT:           </dict>
149 // CHECK-NEXT:          </array>
150 // CHECK-NEXT:         <key>end</key>
151 // CHECK-NEXT:          <array>
152 // CHECK-NEXT:           <dict>
153 // CHECK-NEXT:            <key>line</key><integer>10</integer>
154 // CHECK-NEXT:            <key>col</key><integer>5</integer>
155 // CHECK-NEXT:            <key>file</key><integer>0</integer>
156 // CHECK-NEXT:           </dict>
157 // CHECK-NEXT:           <dict>
158 // CHECK-NEXT:            <key>line</key><integer>10</integer>
159 // CHECK-NEXT:            <key>col</key><integer>10</integer>
160 // CHECK-NEXT:            <key>file</key><integer>0</integer>
161 // CHECK-NEXT:           </dict>
162 // CHECK-NEXT:          </array>
163 // CHECK-NEXT:        </dict>
164 // CHECK-NEXT:       </array>
165 // CHECK-NEXT:     </dict>
166 // CHECK-NEXT:     <dict>
167 // CHECK-NEXT:      <key>kind</key><string>event</string>
168 // CHECK-NEXT:      <key>location</key>
169 // CHECK-NEXT:      <dict>
170 // CHECK-NEXT:       <key>line</key><integer>10</integer>
171 // CHECK-NEXT:       <key>col</key><integer>5</integer>
172 // CHECK-NEXT:       <key>file</key><integer>0</integer>
173 // CHECK-NEXT:      </dict>
174 // CHECK-NEXT:      <key>ranges</key>
175 // CHECK-NEXT:      <array>
176 // CHECK-NEXT:        <array>
177 // CHECK-NEXT:         <dict>
178 // CHECK-NEXT:          <key>line</key><integer>10</integer>
179 // CHECK-NEXT:          <key>col</key><integer>5</integer>
180 // CHECK-NEXT:          <key>file</key><integer>0</integer>
181 // CHECK-NEXT:         </dict>
182 // CHECK-NEXT:         <dict>
183 // CHECK-NEXT:          <key>line</key><integer>10</integer>
184 // CHECK-NEXT:          <key>col</key><integer>12</integer>
185 // CHECK-NEXT:          <key>file</key><integer>0</integer>
186 // CHECK-NEXT:         </dict>
187 // CHECK-NEXT:        </array>
188 // CHECK-NEXT:      </array>
189 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
190 // CHECK-NEXT:      <key>extended_message</key>
191 // CHECK-NEXT:      <string>Memory is released</string>
192 // CHECK-NEXT:      <key>message</key>
193 // CHECK-NEXT:      <string>Memory is released</string>
194 // CHECK-NEXT:     </dict>
195 // CHECK-NEXT:     <dict>
196 // CHECK-NEXT:      <key>kind</key><string>control</string>
197 // CHECK-NEXT:      <key>edges</key>
198 // CHECK-NEXT:       <array>
199 // CHECK-NEXT:        <dict>
200 // CHECK-NEXT:         <key>start</key>
201 // CHECK-NEXT:          <array>
202 // CHECK-NEXT:           <dict>
203 // CHECK-NEXT:            <key>line</key><integer>10</integer>
204 // CHECK-NEXT:            <key>col</key><integer>5</integer>
205 // CHECK-NEXT:            <key>file</key><integer>0</integer>
206 // CHECK-NEXT:           </dict>
207 // CHECK-NEXT:           <dict>
208 // CHECK-NEXT:            <key>line</key><integer>10</integer>
209 // CHECK-NEXT:            <key>col</key><integer>10</integer>
210 // CHECK-NEXT:            <key>file</key><integer>0</integer>
211 // CHECK-NEXT:           </dict>
212 // CHECK-NEXT:          </array>
213 // CHECK-NEXT:         <key>end</key>
214 // CHECK-NEXT:          <array>
215 // CHECK-NEXT:           <dict>
216 // CHECK-NEXT:            <key>line</key><integer>13</integer>
217 // CHECK-NEXT:            <key>col</key><integer>3</integer>
218 // CHECK-NEXT:            <key>file</key><integer>0</integer>
219 // CHECK-NEXT:           </dict>
220 // CHECK-NEXT:           <dict>
221 // CHECK-NEXT:            <key>line</key><integer>13</integer>
222 // CHECK-NEXT:            <key>col</key><integer>8</integer>
223 // CHECK-NEXT:            <key>file</key><integer>0</integer>
224 // CHECK-NEXT:           </dict>
225 // CHECK-NEXT:          </array>
226 // CHECK-NEXT:        </dict>
227 // CHECK-NEXT:       </array>
228 // CHECK-NEXT:     </dict>
229 // CHECK-NEXT:     <dict>
230 // CHECK-NEXT:      <key>kind</key><string>event</string>
231 // CHECK-NEXT:      <key>location</key>
232 // CHECK-NEXT:      <dict>
233 // CHECK-NEXT:       <key>line</key><integer>13</integer>
234 // CHECK-NEXT:       <key>col</key><integer>3</integer>
235 // CHECK-NEXT:       <key>file</key><integer>0</integer>
236 // CHECK-NEXT:      </dict>
237 // CHECK-NEXT:      <key>ranges</key>
238 // CHECK-NEXT:      <array>
239 // CHECK-NEXT:        <array>
240 // CHECK-NEXT:         <dict>
241 // CHECK-NEXT:          <key>line</key><integer>13</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>13</integer>
247 // CHECK-NEXT:          <key>col</key><integer>10</integer>
248 // CHECK-NEXT:          <key>file</key><integer>0</integer>
249 // CHECK-NEXT:         </dict>
250 // CHECK-NEXT:        </array>
251 // CHECK-NEXT:      </array>
252 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
253 // CHECK-NEXT:      <key>extended_message</key>
254 // CHECK-NEXT:      <string>Attempt to free released memory</string>
255 // CHECK-NEXT:      <key>message</key>
256 // CHECK-NEXT:      <string>Attempt to free released memory</string>
257 // CHECK-NEXT:     </dict>
258 // CHECK-NEXT:    </array>
259 // CHECK-NEXT:    <key>description</key><string>Attempt to free released memory</string>
260 // CHECK-NEXT:    <key>category</key><string>Memory Error</string>
261 // CHECK-NEXT:    <key>type</key><string>Double free</string>
262 // CHECK-NEXT:    <key>check_name</key><string>cplusplus.NewDelete</string>
263 // CHECK-NEXT:    <!-- This hash is experimental and going to change! -->
264 // CHECK-NEXT:    <key>issue_hash_content_of_line_in_context</key><string>bd8e324d09c70b9e2be6f824a4942e5a</string>
265 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
266 // CHECK-NEXT:   <key>issue_context</key><string>test</string>
267 // CHECK-NEXT:   <key>issue_hash_function_offset</key><string>8</string>
268 // CHECK-NEXT:   <key>location</key>
269 // CHECK-NEXT:   <dict>
270 // CHECK-NEXT:    <key>line</key><integer>13</integer>
271 // CHECK-NEXT:    <key>col</key><integer>3</integer>
272 // CHECK-NEXT:    <key>file</key><integer>0</integer>
273 // CHECK-NEXT:   </dict>
274 // CHECK-NEXT:   </dict>
275 // CHECK-NEXT:   <dict>
276 // CHECK-NEXT:    <key>path</key>
277 // CHECK-NEXT:    <array>
278 // CHECK-NEXT:     <dict>
279 // CHECK-NEXT:      <key>kind</key><string>event</string>
280 // CHECK-NEXT:      <key>location</key>
281 // CHECK-NEXT:      <dict>
282 // CHECK-NEXT:       <key>line</key><integer>24</integer>
283 // CHECK-NEXT:       <key>col</key><integer>2</integer>
284 // CHECK-NEXT:       <key>file</key><integer>0</integer>
285 // CHECK-NEXT:      </dict>
286 // CHECK-NEXT:      <key>ranges</key>
287 // CHECK-NEXT:      <array>
288 // CHECK-NEXT:        <array>
289 // CHECK-NEXT:         <dict>
290 // CHECK-NEXT:          <key>line</key><integer>24</integer>
291 // CHECK-NEXT:          <key>col</key><integer>2</integer>
292 // CHECK-NEXT:          <key>file</key><integer>0</integer>
293 // CHECK-NEXT:         </dict>
294 // CHECK-NEXT:         <dict>
295 // CHECK-NEXT:          <key>line</key><integer>24</integer>
296 // CHECK-NEXT:          <key>col</key><integer>12</integer>
297 // CHECK-NEXT:          <key>file</key><integer>0</integer>
298 // CHECK-NEXT:         </dict>
299 // CHECK-NEXT:        </array>
300 // CHECK-NEXT:      </array>
301 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
302 // CHECK-NEXT:      <key>extended_message</key>
303 // CHECK-NEXT:      <string>Calling &apos;Odd::kill&apos;</string>
304 // CHECK-NEXT:      <key>message</key>
305 // CHECK-NEXT:      <string>Calling &apos;Odd::kill&apos;</string>
306 // CHECK-NEXT:     </dict>
307 // CHECK-NEXT:     <dict>
308 // CHECK-NEXT:      <key>kind</key><string>event</string>
309 // CHECK-NEXT:      <key>location</key>
310 // CHECK-NEXT:      <dict>
311 // CHECK-NEXT:       <key>line</key><integer>18</integer>
312 // CHECK-NEXT:       <key>col</key><integer>2</integer>
313 // CHECK-NEXT:       <key>file</key><integer>0</integer>
314 // CHECK-NEXT:      </dict>
315 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
316 // CHECK-NEXT:      <key>extended_message</key>
317 // CHECK-NEXT:      <string>Entered call from &apos;test&apos;</string>
318 // CHECK-NEXT:      <key>message</key>
319 // CHECK-NEXT:      <string>Entered call from &apos;test&apos;</string>
320 // CHECK-NEXT:     </dict>
321 // CHECK-NEXT:     <dict>
322 // CHECK-NEXT:      <key>kind</key><string>control</string>
323 // CHECK-NEXT:      <key>edges</key>
324 // CHECK-NEXT:       <array>
325 // CHECK-NEXT:        <dict>
326 // CHECK-NEXT:         <key>start</key>
327 // CHECK-NEXT:          <array>
328 // CHECK-NEXT:           <dict>
329 // CHECK-NEXT:            <key>line</key><integer>18</integer>
330 // CHECK-NEXT:            <key>col</key><integer>2</integer>
331 // CHECK-NEXT:            <key>file</key><integer>0</integer>
332 // CHECK-NEXT:           </dict>
333 // CHECK-NEXT:           <dict>
334 // CHECK-NEXT:            <key>line</key><integer>18</integer>
335 // CHECK-NEXT:            <key>col</key><integer>5</integer>
336 // CHECK-NEXT:            <key>file</key><integer>0</integer>
337 // CHECK-NEXT:           </dict>
338 // CHECK-NEXT:          </array>
339 // CHECK-NEXT:         <key>end</key>
340 // CHECK-NEXT:          <array>
341 // CHECK-NEXT:           <dict>
342 // CHECK-NEXT:            <key>line</key><integer>19</integer>
343 // CHECK-NEXT:            <key>col</key><integer>3</integer>
344 // CHECK-NEXT:            <key>file</key><integer>0</integer>
345 // CHECK-NEXT:           </dict>
346 // CHECK-NEXT:           <dict>
347 // CHECK-NEXT:            <key>line</key><integer>19</integer>
348 // CHECK-NEXT:            <key>col</key><integer>8</integer>
349 // CHECK-NEXT:            <key>file</key><integer>0</integer>
350 // CHECK-NEXT:           </dict>
351 // CHECK-NEXT:          </array>
352 // CHECK-NEXT:        </dict>
353 // CHECK-NEXT:       </array>
354 // CHECK-NEXT:     </dict>
355 // CHECK-NEXT:     <dict>
356 // CHECK-NEXT:      <key>kind</key><string>event</string>
357 // CHECK-NEXT:      <key>location</key>
358 // CHECK-NEXT:      <dict>
359 // CHECK-NEXT:       <key>line</key><integer>19</integer>
360 // CHECK-NEXT:       <key>col</key><integer>3</integer>
361 // CHECK-NEXT:       <key>file</key><integer>0</integer>
362 // CHECK-NEXT:      </dict>
363 // CHECK-NEXT:      <key>ranges</key>
364 // CHECK-NEXT:      <array>
365 // CHECK-NEXT:        <array>
366 // CHECK-NEXT:         <dict>
367 // CHECK-NEXT:          <key>line</key><integer>19</integer>
368 // CHECK-NEXT:          <key>col</key><integer>3</integer>
369 // CHECK-NEXT:          <key>file</key><integer>0</integer>
370 // CHECK-NEXT:         </dict>
371 // CHECK-NEXT:         <dict>
372 // CHECK-NEXT:          <key>line</key><integer>19</integer>
373 // CHECK-NEXT:          <key>col</key><integer>13</integer>
374 // CHECK-NEXT:          <key>file</key><integer>0</integer>
375 // CHECK-NEXT:         </dict>
376 // CHECK-NEXT:        </array>
377 // CHECK-NEXT:      </array>
378 // CHECK-NEXT:      <key>depth</key><integer>1</integer>
379 // CHECK-NEXT:      <key>extended_message</key>
380 // CHECK-NEXT:      <string>Memory is released</string>
381 // CHECK-NEXT:      <key>message</key>
382 // CHECK-NEXT:      <string>Memory is released</string>
383 // CHECK-NEXT:     </dict>
384 // CHECK-NEXT:     <dict>
385 // CHECK-NEXT:      <key>kind</key><string>event</string>
386 // CHECK-NEXT:      <key>location</key>
387 // CHECK-NEXT:      <dict>
388 // CHECK-NEXT:       <key>line</key><integer>24</integer>
389 // CHECK-NEXT:       <key>col</key><integer>2</integer>
390 // CHECK-NEXT:       <key>file</key><integer>0</integer>
391 // CHECK-NEXT:      </dict>
392 // CHECK-NEXT:      <key>ranges</key>
393 // CHECK-NEXT:      <array>
394 // CHECK-NEXT:        <array>
395 // CHECK-NEXT:         <dict>
396 // CHECK-NEXT:          <key>line</key><integer>24</integer>
397 // CHECK-NEXT:          <key>col</key><integer>2</integer>
398 // CHECK-NEXT:          <key>file</key><integer>0</integer>
399 // CHECK-NEXT:         </dict>
400 // CHECK-NEXT:         <dict>
401 // CHECK-NEXT:          <key>line</key><integer>24</integer>
402 // CHECK-NEXT:          <key>col</key><integer>12</integer>
403 // CHECK-NEXT:          <key>file</key><integer>0</integer>
404 // CHECK-NEXT:         </dict>
405 // CHECK-NEXT:        </array>
406 // CHECK-NEXT:      </array>
407 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
408 // CHECK-NEXT:      <key>extended_message</key>
409 // CHECK-NEXT:      <string>Returning; memory was released</string>
410 // CHECK-NEXT:      <key>message</key>
411 // CHECK-NEXT:      <string>Returning; memory was released</string>
412 // CHECK-NEXT:     </dict>
413 // CHECK-NEXT:     <dict>
414 // CHECK-NEXT:      <key>kind</key><string>control</string>
415 // CHECK-NEXT:      <key>edges</key>
416 // CHECK-NEXT:       <array>
417 // CHECK-NEXT:        <dict>
418 // CHECK-NEXT:         <key>start</key>
419 // CHECK-NEXT:          <array>
420 // CHECK-NEXT:           <dict>
421 // CHECK-NEXT:            <key>line</key><integer>24</integer>
422 // CHECK-NEXT:            <key>col</key><integer>2</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>24</integer>
427 // CHECK-NEXT:            <key>col</key><integer>4</integer>
428 // CHECK-NEXT:            <key>file</key><integer>0</integer>
429 // CHECK-NEXT:           </dict>
430 // CHECK-NEXT:          </array>
431 // CHECK-NEXT:         <key>end</key>
432 // CHECK-NEXT:          <array>
433 // CHECK-NEXT:           <dict>
434 // CHECK-NEXT:            <key>line</key><integer>26</integer>
435 // CHECK-NEXT:            <key>col</key><integer>2</integer>
436 // CHECK-NEXT:            <key>file</key><integer>0</integer>
437 // CHECK-NEXT:           </dict>
438 // CHECK-NEXT:           <dict>
439 // CHECK-NEXT:            <key>line</key><integer>26</integer>
440 // CHECK-NEXT:            <key>col</key><integer>7</integer>
441 // CHECK-NEXT:            <key>file</key><integer>0</integer>
442 // CHECK-NEXT:           </dict>
443 // CHECK-NEXT:          </array>
444 // CHECK-NEXT:        </dict>
445 // CHECK-NEXT:       </array>
446 // CHECK-NEXT:     </dict>
447 // CHECK-NEXT:     <dict>
448 // CHECK-NEXT:      <key>kind</key><string>event</string>
449 // CHECK-NEXT:      <key>location</key>
450 // CHECK-NEXT:      <dict>
451 // CHECK-NEXT:       <key>line</key><integer>26</integer>
452 // CHECK-NEXT:       <key>col</key><integer>2</integer>
453 // CHECK-NEXT:       <key>file</key><integer>0</integer>
454 // CHECK-NEXT:      </dict>
455 // CHECK-NEXT:      <key>ranges</key>
456 // CHECK-NEXT:      <array>
457 // CHECK-NEXT:        <array>
458 // CHECK-NEXT:         <dict>
459 // CHECK-NEXT:          <key>line</key><integer>26</integer>
460 // CHECK-NEXT:          <key>col</key><integer>2</integer>
461 // CHECK-NEXT:          <key>file</key><integer>0</integer>
462 // CHECK-NEXT:         </dict>
463 // CHECK-NEXT:         <dict>
464 // CHECK-NEXT:          <key>line</key><integer>26</integer>
465 // CHECK-NEXT:          <key>col</key><integer>11</integer>
466 // CHECK-NEXT:          <key>file</key><integer>0</integer>
467 // CHECK-NEXT:         </dict>
468 // CHECK-NEXT:        </array>
469 // CHECK-NEXT:      </array>
470 // CHECK-NEXT:      <key>depth</key><integer>0</integer>
471 // CHECK-NEXT:      <key>extended_message</key>
472 // CHECK-NEXT:      <string>Attempt to free released memory</string>
473 // CHECK-NEXT:      <key>message</key>
474 // CHECK-NEXT:      <string>Attempt to free released memory</string>
475 // CHECK-NEXT:     </dict>
476 // CHECK-NEXT:    </array>
477 // CHECK-NEXT:    <key>description</key><string>Attempt to free released memory</string>
478 // CHECK-NEXT:    <key>category</key><string>Memory Error</string>
479 // CHECK-NEXT:    <key>type</key><string>Double free</string>
480 // CHECK-NEXT:    <key>check_name</key><string>cplusplus.NewDelete</string>
481 // CHECK-NEXT:    <!-- This hash is experimental and going to change! -->
482 // CHECK-NEXT:    <key>issue_hash_content_of_line_in_context</key><string>8bf1a5b9fdae9d86780aa6c4cdce2605</string>
483 // CHECK-NEXT:   <key>issue_context_kind</key><string>function</string>
484 // CHECK-NEXT:   <key>issue_context</key><string>test</string>
485 // CHECK-NEXT:   <key>issue_hash_function_offset</key><string>3</string>
486 // CHECK-NEXT:   <key>location</key>
487 // CHECK-NEXT:   <dict>
488 // CHECK-NEXT:    <key>line</key><integer>26</integer>
489 // CHECK-NEXT:    <key>col</key><integer>2</integer>
490 // CHECK-NEXT:    <key>file</key><integer>0</integer>
491 // CHECK-NEXT:   </dict>
492 // CHECK-NEXT:   </dict>
493 // CHECK-NEXT:  </array>
494