Skip to content

Commit 6608984

Browse files
committed
FlowSummaryImpl: Model more source/sink steps as jump steps
1 parent b0fa3e7 commit 6608984

10 files changed

Lines changed: 174 additions & 74 deletions

File tree

cpp/ql/test/library-tests/dataflow/external-models/flow.expected

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -240,42 +240,49 @@ edges
240240
| test.cpp:223:12:223:12 | *s | test.cpp:223:13:223:15 | call to operator[] | provenance | MaD:87 |
241241
| test.cpp:223:13:223:15 | call to operator[] | test.cpp:223:13:223:15 | call to operator[] | provenance | |
242242
| test.cpp:223:13:223:15 | call to operator[] | test.cpp:224:11:224:11 | c | provenance | Sink:MaD:3 |
243+
| test.cpp:242:29:242:29 | *s [value] | test.cpp:243:10:243:10 | *s [value] | provenance | |
243244
| test.cpp:243:10:243:10 | *s [value] | test.cpp:243:13:243:17 | value | provenance | |
244245
| test.cpp:243:13:243:17 | value | test.cpp:243:13:243:17 | value | provenance | Sink:MaD:3 |
245246
| test.cpp:247:26:247:39 | call to ymlFieldSource | test.cpp:247:26:247:39 | call to ymlFieldSource [value] | provenance | Src:MaD:47 |
246247
| test.cpp:247:26:247:39 | call to ymlFieldSource [value] | test.cpp:248:10:248:16 | *wrapper [value] | provenance | |
247248
| test.cpp:248:10:248:16 | *wrapper [value] | test.cpp:248:18:248:22 | value | provenance | |
248249
| test.cpp:248:18:248:22 | value | test.cpp:248:18:248:22 | value | provenance | Sink:MaD:3 |
249250
| test.cpp:250:32:250:32 | source_from_callback_template output argument | test.cpp:250:32:250:32 | source_from_callback_template output argument [value] | provenance | Src:MaD:40 |
250-
| test.cpp:250:32:250:32 | source_from_callback_template output argument [value] | test.cpp:243:10:243:10 | *s [value] | provenance | |
251+
| test.cpp:250:32:250:32 | source_from_callback_template output argument [value] | test.cpp:242:29:242:29 | *s [value] | provenance | |
251252
| test.cpp:251:27:251:27 | source_from_callback_ptr output argument | test.cpp:251:27:251:27 | source_from_callback_ptr output argument [value] | provenance | Src:MaD:37 |
252-
| test.cpp:251:27:251:27 | source_from_callback_ptr output argument [value] | test.cpp:243:10:243:10 | *s [value] | provenance | |
253+
| test.cpp:251:27:251:27 | source_from_callback_ptr output argument [value] | test.cpp:242:29:242:29 | *s [value] | provenance | |
254+
| test.cpp:257:35:257:35 | *s [value] | test.cpp:258:12:258:12 | *s [value] | provenance | |
253255
| test.cpp:258:12:258:12 | *s [value] | test.cpp:258:15:258:19 | value | provenance | |
254256
| test.cpp:258:15:258:19 | value | test.cpp:258:15:258:19 | value | provenance | Sink:MaD:3 |
255257
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument | test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | provenance | Src:MaD:37 |
256-
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | test.cpp:243:10:243:10 | *s [value] | provenance | |
257-
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | test.cpp:258:12:258:12 | *s [value] | provenance | |
258+
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | test.cpp:242:29:242:29 | *s [value] | provenance | |
259+
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | test.cpp:257:35:257:35 | *s [value] | provenance | |
258260
| test.cpp:264:32:266:2 | source_from_callback_template output argument | test.cpp:264:32:266:2 | source_from_callback_template output argument [value] | provenance | Src:MaD:40 |
259-
| test.cpp:264:32:266:2 | source_from_callback_template output argument [value] | test.cpp:265:11:265:11 | *s [value] | provenance | |
261+
| test.cpp:264:32:266:2 | source_from_callback_template output argument [value] | test.cpp:264:56:264:56 | *s [value] | provenance | |
262+
| test.cpp:264:56:264:56 | *s [value] | test.cpp:265:11:265:11 | *s [value] | provenance | |
260263
| test.cpp:265:11:265:11 | *s [value] | test.cpp:265:14:265:18 | value | provenance | |
261264
| test.cpp:265:14:265:18 | value | test.cpp:265:14:265:18 | value | provenance | Sink:MaD:3 |
262265
| test.cpp:268:27:268:27 | source_from_callback_ptr output argument | test.cpp:268:27:268:27 | source_from_callback_ptr output argument [value] | provenance | Src:MaD:37 |
263-
| test.cpp:268:27:268:27 | source_from_callback_ptr output argument [value] | test.cpp:269:11:269:11 | *s [value] | provenance | |
266+
| test.cpp:268:27:268:27 | source_from_callback_ptr output argument [value] | test.cpp:268:51:268:51 | *s [value] | provenance | |
267+
| test.cpp:268:51:268:51 | *s [value] | test.cpp:269:11:269:11 | *s [value] | provenance | |
264268
| test.cpp:269:11:269:11 | *s [value] | test.cpp:269:14:269:18 | value | provenance | |
265269
| test.cpp:269:14:269:18 | value | test.cpp:269:14:269:18 | value | provenance | Sink:MaD:3 |
270+
| test.cpp:273:40:273:40 | *s [value] | test.cpp:274:12:274:12 | *s [value] | provenance | |
266271
| test.cpp:274:12:274:12 | *s [value] | test.cpp:274:15:274:19 | value | provenance | |
267272
| test.cpp:274:15:274:19 | value | test.cpp:274:15:274:19 | value | provenance | Sink:MaD:3 |
268273
| test.cpp:278:32:278:34 | source_from_callback_template output argument | test.cpp:278:32:278:34 | source_from_callback_template output argument [value] | provenance | Src:MaD:40 |
269-
| test.cpp:278:32:278:34 | source_from_callback_template output argument [value] | test.cpp:274:12:274:12 | *s [value] | provenance | |
274+
| test.cpp:278:32:278:34 | source_from_callback_template output argument [value] | test.cpp:273:40:273:40 | *s [value] | provenance | |
270275
| test.cpp:293:5:293:26 | *callback_returning_int | test.cpp:307:10:307:31 | call to callback_returning_int | provenance | |
271276
| test.cpp:294:5:294:28 | *callback_returning_int_2 | test.cpp:310:10:310:33 | call to callback_returning_int_2 | provenance | |
272277
| test.cpp:295:6:295:31 | **callback_returning_ptr_int | test.cpp:313:13:313:38 | *call to callback_returning_ptr_int | provenance | |
278+
| test.cpp:297:5:297:20 | *return_ymlSource | test.cpp:318:37:318:52 | return_ymlSource | provenance | Sink:MaD:1 |
279+
| test.cpp:297:33:297:41 | call to ymlSource | test.cpp:297:5:297:20 | *return_ymlSource | provenance | |
280+
| test.cpp:297:33:297:41 | call to ymlSource | test.cpp:297:5:297:20 | *return_ymlSource | provenance | Src:MaD:48 |
273281
| test.cpp:297:33:297:41 | call to ymlSource | test.cpp:297:33:297:41 | call to ymlSource | provenance | Src:MaD:48 |
274-
| test.cpp:297:33:297:41 | call to ymlSource | test.cpp:318:37:318:52 | return_ymlSource | provenance | Sink:MaD:1 |
275-
| test.cpp:297:33:297:41 | call to ymlSource | test.cpp:318:37:318:52 | return_ymlSource | provenance | Src:MaD:48 Sink:MaD:1 |
276-
| test.cpp:299:41:299:52 | *call to ymlSourcePtr | test.cpp:321:36:321:58 | return_ptr_to_ymlSource | provenance | Sink:MaD:2 |
282+
| test.cpp:299:6:299:28 | **return_ptr_to_ymlSource | test.cpp:321:36:321:58 | return_ptr_to_ymlSource | provenance | Sink:MaD:2 |
283+
| test.cpp:299:41:299:52 | *call to ymlSourcePtr | test.cpp:299:6:299:28 | **return_ptr_to_ymlSource | provenance | |
284+
| test.cpp:299:41:299:52 | call to ymlSourcePtr | test.cpp:299:6:299:28 | **return_ptr_to_ymlSource | provenance | Src:MaD:49 |
277285
| test.cpp:299:41:299:52 | call to ymlSourcePtr | test.cpp:299:41:299:52 | *call to ymlSourcePtr | provenance | Src:MaD:49 |
278-
| test.cpp:299:41:299:52 | call to ymlSourcePtr | test.cpp:321:36:321:58 | return_ptr_to_ymlSource | provenance | Src:MaD:49 Sink:MaD:2 |
279286
| test.cpp:304:11:304:22 | call to ymlSourcePtr | test.cpp:304:10:304:24 | * ... | provenance | Src:MaD:49 Sink:MaD:3 |
280287
| test.cpp:306:39:306:60 | source_from_callback_return_template output argument | test.cpp:293:5:293:26 | *callback_returning_int | provenance | Src:MaD:39 |
281288
| test.cpp:307:10:307:31 | call to callback_returning_int | test.cpp:307:10:307:31 | call to callback_returning_int | provenance | Sink:MaD:3 |
@@ -284,11 +291,13 @@ edges
284291
| test.cpp:312:38:312:63 | source_ptr_from_callback_return_ptr output argument | test.cpp:295:6:295:31 | **callback_returning_ptr_int | provenance | Src:MaD:41 |
285292
| test.cpp:313:13:313:38 | *call to callback_returning_ptr_int | test.cpp:313:13:313:38 | *call to callback_returning_ptr_int | provenance | |
286293
| test.cpp:313:13:313:38 | *call to callback_returning_ptr_int | test.cpp:315:10:315:13 | * ... | provenance | Sink:MaD:3 |
287-
| test.cpp:317:51:317:59 | call to ymlSource | test.cpp:317:37:317:64 | [...](...){...} | provenance | Sink:MaD:1 |
288-
| test.cpp:317:51:317:59 | call to ymlSource | test.cpp:317:37:317:64 | [...](...){...} | provenance | Src:MaD:48 Sink:MaD:1 |
294+
| test.cpp:317:39:317:39 | *operator() | test.cpp:317:37:317:64 | [...](...){...} | provenance | Sink:MaD:1 |
295+
| test.cpp:317:51:317:59 | call to ymlSource | test.cpp:317:39:317:39 | *operator() | provenance | |
296+
| test.cpp:317:51:317:59 | call to ymlSource | test.cpp:317:39:317:39 | *operator() | provenance | Src:MaD:48 |
289297
| test.cpp:317:51:317:59 | call to ymlSource | test.cpp:317:51:317:59 | call to ymlSource | provenance | Src:MaD:48 |
290-
| test.cpp:320:50:320:61 | *call to ymlSourcePtr | test.cpp:320:36:320:36 | call to operator int *(*)() | provenance | Sink:MaD:2 |
291-
| test.cpp:320:50:320:61 | call to ymlSourcePtr | test.cpp:320:36:320:36 | call to operator int *(*)() | provenance | Src:MaD:49 Sink:MaD:2 |
298+
| test.cpp:320:38:320:38 | **operator() | test.cpp:320:36:320:36 | call to operator int *(*)() | provenance | Sink:MaD:2 |
299+
| test.cpp:320:50:320:61 | *call to ymlSourcePtr | test.cpp:320:38:320:38 | **operator() | provenance | |
300+
| test.cpp:320:50:320:61 | call to ymlSourcePtr | test.cpp:320:38:320:38 | **operator() | provenance | Src:MaD:49 |
292301
| test.cpp:320:50:320:61 | call to ymlSourcePtr | test.cpp:320:50:320:61 | *call to ymlSourcePtr | provenance | Src:MaD:49 |
293302
| test.cpp:324:36:324:36 | p | test.cpp:325:10:325:10 | *p [value] | provenance | Src:MaD:43 |
294303
| test.cpp:324:36:324:36 | p | test.cpp:327:11:327:11 | *p [*pointer] | provenance | Src:MaD:42 |
@@ -640,6 +649,7 @@ nodes
640649
| test.cpp:223:13:223:15 | call to operator[] | semmle.label | call to operator[] |
641650
| test.cpp:223:13:223:15 | call to operator[] | semmle.label | call to operator[] |
642651
| test.cpp:224:11:224:11 | c | semmle.label | c |
652+
| test.cpp:242:29:242:29 | *s [value] | semmle.label | *s [value] |
643653
| test.cpp:243:10:243:10 | *s [value] | semmle.label | *s [value] |
644654
| test.cpp:243:13:243:17 | value | semmle.label | value |
645655
| test.cpp:243:13:243:17 | value | semmle.label | value |
@@ -652,21 +662,25 @@ nodes
652662
| test.cpp:250:32:250:32 | source_from_callback_template output argument [value] | semmle.label | source_from_callback_template output argument [value] |
653663
| test.cpp:251:27:251:27 | source_from_callback_ptr output argument | semmle.label | source_from_callback_ptr output argument |
654664
| test.cpp:251:27:251:27 | source_from_callback_ptr output argument [value] | semmle.label | source_from_callback_ptr output argument [value] |
665+
| test.cpp:257:35:257:35 | *s [value] | semmle.label | *s [value] |
655666
| test.cpp:258:12:258:12 | *s [value] | semmle.label | *s [value] |
656667
| test.cpp:258:15:258:19 | value | semmle.label | value |
657668
| test.cpp:258:15:258:19 | value | semmle.label | value |
658669
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument | semmle.label | source_from_callback_ptr output argument |
659670
| test.cpp:262:27:262:31 | source_from_callback_ptr output argument [value] | semmle.label | source_from_callback_ptr output argument [value] |
660671
| test.cpp:264:32:266:2 | source_from_callback_template output argument | semmle.label | source_from_callback_template output argument |
661672
| test.cpp:264:32:266:2 | source_from_callback_template output argument [value] | semmle.label | source_from_callback_template output argument [value] |
673+
| test.cpp:264:56:264:56 | *s [value] | semmle.label | *s [value] |
662674
| test.cpp:265:11:265:11 | *s [value] | semmle.label | *s [value] |
663675
| test.cpp:265:14:265:18 | value | semmle.label | value |
664676
| test.cpp:265:14:265:18 | value | semmle.label | value |
665677
| test.cpp:268:27:268:27 | source_from_callback_ptr output argument | semmle.label | source_from_callback_ptr output argument |
666678
| test.cpp:268:27:268:27 | source_from_callback_ptr output argument [value] | semmle.label | source_from_callback_ptr output argument [value] |
679+
| test.cpp:268:51:268:51 | *s [value] | semmle.label | *s [value] |
667680
| test.cpp:269:11:269:11 | *s [value] | semmle.label | *s [value] |
668681
| test.cpp:269:14:269:18 | value | semmle.label | value |
669682
| test.cpp:269:14:269:18 | value | semmle.label | value |
683+
| test.cpp:273:40:273:40 | *s [value] | semmle.label | *s [value] |
670684
| test.cpp:274:12:274:12 | *s [value] | semmle.label | *s [value] |
671685
| test.cpp:274:15:274:19 | value | semmle.label | value |
672686
| test.cpp:274:15:274:19 | value | semmle.label | value |
@@ -675,8 +689,10 @@ nodes
675689
| test.cpp:293:5:293:26 | *callback_returning_int | semmle.label | *callback_returning_int |
676690
| test.cpp:294:5:294:28 | *callback_returning_int_2 | semmle.label | *callback_returning_int_2 |
677691
| test.cpp:295:6:295:31 | **callback_returning_ptr_int | semmle.label | **callback_returning_ptr_int |
692+
| test.cpp:297:5:297:20 | *return_ymlSource | semmle.label | *return_ymlSource |
678693
| test.cpp:297:33:297:41 | call to ymlSource | semmle.label | call to ymlSource |
679694
| test.cpp:297:33:297:41 | call to ymlSource | semmle.label | call to ymlSource |
695+
| test.cpp:299:6:299:28 | **return_ptr_to_ymlSource | semmle.label | **return_ptr_to_ymlSource |
680696
| test.cpp:299:41:299:52 | *call to ymlSourcePtr | semmle.label | *call to ymlSourcePtr |
681697
| test.cpp:299:41:299:52 | call to ymlSourcePtr | semmle.label | call to ymlSourcePtr |
682698
| test.cpp:304:10:304:24 | * ... | semmle.label | * ... |
@@ -692,10 +708,12 @@ nodes
692708
| test.cpp:313:13:313:38 | *call to callback_returning_ptr_int | semmle.label | *call to callback_returning_ptr_int |
693709
| test.cpp:315:10:315:13 | * ... | semmle.label | * ... |
694710
| test.cpp:317:37:317:64 | [...](...){...} | semmle.label | [...](...){...} |
711+
| test.cpp:317:39:317:39 | *operator() | semmle.label | *operator() |
695712
| test.cpp:317:51:317:59 | call to ymlSource | semmle.label | call to ymlSource |
696713
| test.cpp:317:51:317:59 | call to ymlSource | semmle.label | call to ymlSource |
697714
| test.cpp:318:37:318:52 | return_ymlSource | semmle.label | return_ymlSource |
698715
| test.cpp:320:36:320:36 | call to operator int *(*)() | semmle.label | call to operator int *(*)() |
716+
| test.cpp:320:38:320:38 | **operator() | semmle.label | **operator() |
699717
| test.cpp:320:50:320:61 | *call to ymlSourcePtr | semmle.label | *call to ymlSourcePtr |
700718
| test.cpp:320:50:320:61 | call to ymlSourcePtr | semmle.label | call to ymlSourcePtr |
701719
| test.cpp:321:36:321:58 | return_ptr_to_ymlSource | semmle.label | return_ptr_to_ymlSource |

0 commit comments

Comments
 (0)