Skip to content

Commit 0dbe8c3

Browse files
authored
Merge pull request #15140 from hvitved/dataflow/pruned-ctx-sensitivity
Data flow: prune context-sensitivity relations
2 parents d13ea0b + bd7b2c4 commit 0dbe8c3

File tree

6 files changed

+436
-271
lines changed

6 files changed

+436
-271
lines changed

csharp/ql/test/library-tests/dataflow/collections/CollectionFlow.expected

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ edges
44
| CollectionFlow.cs:14:52:14:53 | access to parameter ts : A[] [element] : A | CollectionFlow.cs:14:52:14:56 | access to array element | provenance | |
55
| CollectionFlow.cs:14:52:14:53 | access to parameter ts : null [element] : A | CollectionFlow.cs:14:52:14:56 | access to array element | provenance | |
66
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | provenance | |
7-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | provenance | |
8-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | provenance | |
9-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | provenance | |
10-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | |
11-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | |
12-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | |
137
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:16:63:16:69 | access to indexer | provenance | |
148
| CollectionFlow.cs:18:61:18:64 | dict : Dictionary<T,T> [element, property Value] : A | CollectionFlow.cs:18:75:18:78 | access to parameter dict : Dictionary<T,T> [element, property Value] : A | provenance | |
159
| CollectionFlow.cs:18:75:18:78 | access to parameter dict : Dictionary<T,T> [element, property Value] : A | CollectionFlow.cs:18:75:18:81 | access to indexer | provenance | |
@@ -21,12 +15,6 @@ edges
2115
| CollectionFlow.cs:22:41:22:42 | access to parameter ts : A[] [element] : A | CollectionFlow.cs:22:41:22:45 | access to array element : A | provenance | |
2216
| CollectionFlow.cs:22:41:22:42 | access to parameter ts : null [element] : A | CollectionFlow.cs:22:41:22:45 | access to array element : A | provenance | |
2317
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | provenance | |
24-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | provenance | |
25-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | provenance | |
26-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | provenance | |
27-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | |
28-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | |
29-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | |
3018
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | CollectionFlow.cs:24:52:24:58 | access to indexer : A | provenance | |
3119
| CollectionFlow.cs:26:58:26:61 | dict : Dictionary<T,T> [element, property Value] : A | CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary<T,T> [element, property Value] : A | provenance | |
3220
| CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary<T,T> [element, property Value] : A | CollectionFlow.cs:26:67:26:73 | access to indexer : A | provenance | |
@@ -324,12 +312,6 @@ nodes
324312
| CollectionFlow.cs:14:52:14:53 | access to parameter ts : null [element] : A | semmle.label | access to parameter ts : null [element] : A |
325313
| CollectionFlow.cs:14:52:14:56 | access to array element | semmle.label | access to array element |
326314
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
327-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
328-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
329-
| CollectionFlow.cs:16:49:16:52 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
330-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
331-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
332-
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
333315
| CollectionFlow.cs:16:63:16:66 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
334316
| CollectionFlow.cs:16:63:16:69 | access to indexer | semmle.label | access to indexer |
335317
| CollectionFlow.cs:18:61:18:64 | dict : Dictionary<T,T> [element, property Value] : A | semmle.label | dict : Dictionary<T,T> [element, property Value] : A |
@@ -346,16 +328,7 @@ nodes
346328
| CollectionFlow.cs:22:41:22:45 | access to array element : A | semmle.label | access to array element : A |
347329
| CollectionFlow.cs:22:41:22:45 | access to array element : A | semmle.label | access to array element : A |
348330
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
349-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
350-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
351-
| CollectionFlow.cs:24:43:24:46 | list : List<T> [element] : A | semmle.label | list : List<T> [element] : A |
352331
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
353-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
354-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
355-
| CollectionFlow.cs:24:52:24:55 | access to parameter list : List<T> [element] : A | semmle.label | access to parameter list : List<T> [element] : A |
356-
| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A |
357-
| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A |
358-
| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A |
359332
| CollectionFlow.cs:24:52:24:58 | access to indexer : A | semmle.label | access to indexer : A |
360333
| CollectionFlow.cs:26:58:26:61 | dict : Dictionary<T,T> [element, property Value] : A | semmle.label | dict : Dictionary<T,T> [element, property Value] : A |
361334
| CollectionFlow.cs:26:67:26:70 | access to parameter dict : Dictionary<T,T> [element, property Value] : A | semmle.label | access to parameter dict : Dictionary<T,T> [element, property Value] : A |

ruby/ql/test/library-tests/dataflow/call-sensitivity/call-sensitivity.expected

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@ edges
2020
| call_sensitivity.rb:44:26:44:33 | call to taint | call_sensitivity.rb:21:27:21:27 | x | provenance | |
2121
| call_sensitivity.rb:50:15:50:15 | x | call_sensitivity.rb:51:10:51:10 | x | provenance | |
2222
| call_sensitivity.rb:54:15:54:15 | x | call_sensitivity.rb:55:13:55:13 | x | provenance | |
23-
| call_sensitivity.rb:54:15:54:15 | x | call_sensitivity.rb:55:13:55:13 | x | provenance | |
24-
| call_sensitivity.rb:55:13:55:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | |
2523
| call_sensitivity.rb:55:13:55:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | |
2624
| call_sensitivity.rb:58:20:58:20 | x | call_sensitivity.rb:59:18:59:18 | x | provenance | |
2725
| call_sensitivity.rb:59:18:59:18 | x | call_sensitivity.rb:54:15:54:15 | x | provenance | |
2826
| call_sensitivity.rb:62:18:62:18 | y | call_sensitivity.rb:63:15:63:15 | y | provenance | |
29-
| call_sensitivity.rb:62:18:62:18 | y | call_sensitivity.rb:63:15:63:15 | y | provenance | |
30-
| call_sensitivity.rb:63:15:63:15 | y | call_sensitivity.rb:50:15:50:15 | x | provenance | |
3127
| call_sensitivity.rb:63:15:63:15 | y | call_sensitivity.rb:50:15:50:15 | x | provenance | |
3228
| call_sensitivity.rb:66:20:66:20 | x | call_sensitivity.rb:67:24:67:24 | x | provenance | |
3329
| call_sensitivity.rb:67:24:67:24 | x | call_sensitivity.rb:62:18:62:18 | y | provenance | |
@@ -40,26 +36,16 @@ edges
4036
| call_sensitivity.rb:85:18:85:27 | ( ... ) | call_sensitivity.rb:80:15:80:15 | x | provenance | |
4137
| call_sensitivity.rb:85:19:85:26 | call to taint | call_sensitivity.rb:85:18:85:27 | ( ... ) | provenance | |
4238
| call_sensitivity.rb:88:30:88:30 | x | call_sensitivity.rb:89:23:89:23 | x | provenance | |
43-
| call_sensitivity.rb:88:30:88:30 | x | call_sensitivity.rb:89:23:89:23 | x | provenance | |
44-
| call_sensitivity.rb:89:23:89:23 | x | call_sensitivity.rb:70:30:70:30 | x | provenance | |
4539
| call_sensitivity.rb:89:23:89:23 | x | call_sensitivity.rb:70:30:70:30 | x | provenance | |
4640
| call_sensitivity.rb:92:35:92:35 | x | call_sensitivity.rb:93:28:93:28 | x | provenance | |
4741
| call_sensitivity.rb:93:28:93:28 | x | call_sensitivity.rb:88:30:88:30 | x | provenance | |
4842
| call_sensitivity.rb:96:33:96:33 | y | call_sensitivity.rb:97:25:97:25 | y | provenance | |
49-
| call_sensitivity.rb:96:33:96:33 | y | call_sensitivity.rb:97:25:97:25 | y | provenance | |
50-
| call_sensitivity.rb:97:25:97:25 | y | call_sensitivity.rb:70:30:70:30 | x | provenance | |
5143
| call_sensitivity.rb:97:25:97:25 | y | call_sensitivity.rb:70:30:70:30 | x | provenance | |
5244
| call_sensitivity.rb:100:35:100:35 | x | call_sensitivity.rb:101:34:101:34 | x | provenance | |
5345
| call_sensitivity.rb:101:34:101:34 | x | call_sensitivity.rb:96:33:96:33 | y | provenance | |
5446
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | |
5547
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | |
56-
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | |
57-
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:105:10:105:10 | x | provenance | |
5848
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | |
59-
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | |
60-
| call_sensitivity.rb:104:18:104:18 | x | call_sensitivity.rb:106:13:106:13 | x | provenance | |
61-
| call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | |
62-
| call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | |
6349
| call_sensitivity.rb:106:13:106:13 | x | call_sensitivity.rb:50:15:50:15 | x | provenance | |
6450
| call_sensitivity.rb:109:21:109:21 | x | call_sensitivity.rb:110:9:110:9 | x | provenance | |
6551
| call_sensitivity.rb:110:9:110:9 | x | call_sensitivity.rb:104:18:104:18 | x | provenance | |
@@ -124,14 +110,10 @@ nodes
124110
| call_sensitivity.rb:50:15:50:15 | x | semmle.label | x |
125111
| call_sensitivity.rb:51:10:51:10 | x | semmle.label | x |
126112
| call_sensitivity.rb:54:15:54:15 | x | semmle.label | x |
127-
| call_sensitivity.rb:54:15:54:15 | x | semmle.label | x |
128-
| call_sensitivity.rb:55:13:55:13 | x | semmle.label | x |
129113
| call_sensitivity.rb:55:13:55:13 | x | semmle.label | x |
130114
| call_sensitivity.rb:58:20:58:20 | x | semmle.label | x |
131115
| call_sensitivity.rb:59:18:59:18 | x | semmle.label | x |
132116
| call_sensitivity.rb:62:18:62:18 | y | semmle.label | y |
133-
| call_sensitivity.rb:62:18:62:18 | y | semmle.label | y |
134-
| call_sensitivity.rb:63:15:63:15 | y | semmle.label | y |
135117
| call_sensitivity.rb:63:15:63:15 | y | semmle.label | y |
136118
| call_sensitivity.rb:66:20:66:20 | x | semmle.label | x |
137119
| call_sensitivity.rb:67:24:67:24 | x | semmle.label | x |
@@ -145,25 +127,17 @@ nodes
145127
| call_sensitivity.rb:85:18:85:27 | ( ... ) | semmle.label | ( ... ) |
146128
| call_sensitivity.rb:85:19:85:26 | call to taint | semmle.label | call to taint |
147129
| call_sensitivity.rb:88:30:88:30 | x | semmle.label | x |
148-
| call_sensitivity.rb:88:30:88:30 | x | semmle.label | x |
149-
| call_sensitivity.rb:89:23:89:23 | x | semmle.label | x |
150130
| call_sensitivity.rb:89:23:89:23 | x | semmle.label | x |
151131
| call_sensitivity.rb:92:35:92:35 | x | semmle.label | x |
152132
| call_sensitivity.rb:93:28:93:28 | x | semmle.label | x |
153133
| call_sensitivity.rb:96:33:96:33 | y | semmle.label | y |
154-
| call_sensitivity.rb:96:33:96:33 | y | semmle.label | y |
155-
| call_sensitivity.rb:97:25:97:25 | y | semmle.label | y |
156134
| call_sensitivity.rb:97:25:97:25 | y | semmle.label | y |
157135
| call_sensitivity.rb:100:35:100:35 | x | semmle.label | x |
158136
| call_sensitivity.rb:101:34:101:34 | x | semmle.label | x |
159137
| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x |
160138
| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x |
161-
| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x |
162-
| call_sensitivity.rb:104:18:104:18 | x | semmle.label | x |
163139
| call_sensitivity.rb:105:10:105:10 | x | semmle.label | x |
164140
| call_sensitivity.rb:106:13:106:13 | x | semmle.label | x |
165-
| call_sensitivity.rb:106:13:106:13 | x | semmle.label | x |
166-
| call_sensitivity.rb:106:13:106:13 | x | semmle.label | x |
167141
| call_sensitivity.rb:109:21:109:21 | x | semmle.label | x |
168142
| call_sensitivity.rb:110:9:110:9 | x | semmle.label | x |
169143
| call_sensitivity.rb:114:11:114:20 | ( ... ) | semmle.label | ( ... ) |

ruby/ql/test/library-tests/dataflow/global/Flow.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ edges
140140
| instance_variables.rb:28:20:28:24 | field | instance_variables.rb:22:20:22:24 | field | provenance | |
141141
| instance_variables.rb:28:20:28:24 | field | instance_variables.rb:28:9:28:25 | [post] self [@field] | provenance | |
142142
| instance_variables.rb:31:18:31:18 | x | instance_variables.rb:33:13:33:13 | x | provenance | |
143-
| instance_variables.rb:32:13:32:21 | call to taint | instance_variables.rb:22:20:22:24 | field | provenance | |
144143
| instance_variables.rb:32:13:32:21 | call to taint | instance_variables.rb:48:20:48:20 | x | provenance | |
145144
| instance_variables.rb:33:13:33:13 | x | instance_variables.rb:22:20:22:24 | field | provenance | |
146145
| instance_variables.rb:33:13:33:13 | x | instance_variables.rb:33:9:33:14 | call to new [@field] | provenance | |

0 commit comments

Comments
 (0)