Skip to content

Commit 8a9528b

Browse files
C++: Accept test output after fixes for PointerAdd element sizes
1 parent 3108d97 commit 8a9528b

File tree

6 files changed

+6
-2
lines changed

6 files changed

+6
-2
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void following_pointers(
146146

147147
twoIntFields sArray[1] = { { source(), source() } };
148148
// TODO: fix this like above
149-
sink(sArray[0].m2); // no flow (due to limitations of the analysis)
149+
sink(sArray[0].m2); // flow (AST dataflow misses this due to limitations of the analysis)
150150

151151
twoIntFields sSwapped = { .m2 = source(), .m1 = 0 };
152152

cpp/ql/test/library-tests/dataflow/dataflow-tests/test_diff.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
| test.cpp:136:27:136:32 | test.cpp:137:27:137:28 | AST only |
1111
| test.cpp:136:27:136:32 | test.cpp:138:27:138:34 | AST only |
1212
| test.cpp:136:27:136:32 | test.cpp:140:22:140:23 | AST only |
13+
| test.cpp:147:42:147:47 | test.cpp:149:18:149:19 | IR only |
1314
| test.cpp:395:17:395:22 | test.cpp:397:10:397:18 | AST only |
1415
| test.cpp:407:13:407:18 | test.cpp:413:10:413:14 | AST only |
1516
| test.cpp:421:13:421:18 | test.cpp:417:10:417:14 | AST only |

cpp/ql/test/library-tests/dataflow/dataflow-tests/test_ir.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
| test.cpp:126:8:126:19 | Convert: (const int *)... | test.cpp:120:9:120:20 | InitializeParameter: sourceArray1 |
1919
| test.cpp:126:8:126:19 | Load: sourceArray1 | test.cpp:120:9:120:20 | InitializeParameter: sourceArray1 |
2020
| test.cpp:145:10:145:11 | Load: m2 | test.cpp:142:32:142:37 | Call: call to source |
21+
| test.cpp:149:18:149:19 | Load: m2 | test.cpp:147:42:147:47 | Call: call to source |
2122
| test.cpp:153:17:153:18 | Load: m2 | test.cpp:151:35:151:40 | Call: call to source |
2223
| test.cpp:188:8:188:8 | Load: y | test.cpp:186:27:186:32 | Call: call to source |
2324
| test.cpp:192:8:192:8 | Load: s | test.cpp:199:33:199:38 | Call: call to source |

cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void array_test(int i) {
106106
arr2[i] = source();
107107
arr3[5] = 0;
108108

109-
sink(arr1[5]); // tainted [NOT DETECTED]
109+
sink(arr1[5]); // tainted
110110
sink(arr1[i]); // tainted [NOT DETECTED]
111111
sink(arr2[5]); // tainted [NOT DETECTED]
112112
sink(arr2[i]); // tainted [NOT DETECTED]

cpp/ql/test/library-tests/dataflow/taint-tests/test_diff.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
| taint.cpp:91:11:91:11 | taint.cpp:77:7:77:12 | AST only |
77
| taint.cpp:93:11:93:11 | taint.cpp:71:22:71:27 | AST only |
88
| taint.cpp:94:11:94:11 | taint.cpp:72:7:72:12 | AST only |
9+
| taint.cpp:109:7:109:13 | taint.cpp:105:12:105:17 | IR only |
910
| taint.cpp:130:7:130:9 | taint.cpp:127:8:127:13 | IR only |
1011
| taint.cpp:137:7:137:9 | taint.cpp:120:11:120:16 | AST only |
1112
| taint.cpp:173:8:173:13 | taint.cpp:164:19:164:24 | AST only |

cpp/ql/test/library-tests/dataflow/taint-tests/test_ir.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
| taint.cpp:8:8:8:13 | Load: clean1 | taint.cpp:4:27:4:33 | InitializeParameter: source1 |
22
| taint.cpp:16:8:16:14 | Load: source1 | taint.cpp:12:22:12:27 | Call: call to source |
33
| taint.cpp:17:8:17:16 | Add: ++ ... | taint.cpp:12:22:12:27 | Call: call to source |
4+
| taint.cpp:109:7:109:13 | Load: access to array | taint.cpp:105:12:105:17 | Call: call to source |
45
| taint.cpp:129:7:129:9 | Load: * ... | taint.cpp:120:11:120:16 | Call: call to source |
56
| taint.cpp:130:7:130:9 | Load: * ... | taint.cpp:127:8:127:13 | Call: call to source |
67
| taint.cpp:134:7:134:9 | Load: * ... | taint.cpp:120:11:120:16 | Call: call to source |

0 commit comments

Comments
 (0)