Skip to content

Commit 9e9f6dd

Browse files
committed
C++: Accept test changes.
1 parent 246ed9d commit 9e9f6dd

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@
503503
| Dubious signature "(CURLU *,CURLUPart,const char *,unsigned int)" in summary model. |
504504
| Dubious signature "(CURLU *,const char *)" in summary model. |
505505
| Dubious signature "(CURLU *,const char *,char **,OperationConfig *)" in summary model. |
506+
| Dubious signature "(ComPtr &&)" in summary model. |
506507
| Dubious signature "(CompoundDictionary *,const PreparedDictionary *)" in summary model. |
507508
| Dubious signature "(Curl_cfilter *)" in summary model. |
508509
| Dubious signature "(Curl_cfilter **,Curl_easy *)" in summary model. |
@@ -2130,6 +2131,7 @@
21302131
| Dubious signature "(RAND_POOL *,unsigned char *)" in summary model. |
21312132
| Dubious signature "(RAND_POOL *,unsigned int)" in summary model. |
21322133
| Dubious signature "(RECORD_LAYER *,SSL_CONNECTION *)" in summary model. |
2134+
| Dubious signature "(REFIID,void **)" in summary model. |
21332135
| Dubious signature "(RIO_NOTIFIER *)" in summary model. |
21342136
| Dubious signature "(RIPEMD160_CTX *,const unsigned char *)" in summary model. |
21352137
| Dubious signature "(RIPEMD160_CTX *,const void *,size_t)" in summary model. |
@@ -2431,6 +2433,8 @@
24312433
| Dubious signature "(Strent *)" in summary model. |
24322434
| Dubious signature "(Strtab *,const char *,size_t)" in summary model. |
24332435
| Dubious signature "(Strtab *,size_t *)" in summary model. |
2436+
| Dubious signature "(T *)" in summary model. |
2437+
| Dubious signature "(T **)" in summary model. |
24342438
| Dubious signature "(TLS_FEATURE *)" in summary model. |
24352439
| Dubious signature "(TLS_RL_RECORD *,const unsigned char *)" in summary model. |
24362440
| Dubious signature "(TS_ACCURACY *)" in summary model. |
@@ -3155,6 +3159,7 @@
31553159
| Dubious signature "(const CT_POLICY_EVAL_CTX *)" in summary model. |
31563160
| Dubious signature "(const CURLU *)" in summary model. |
31573161
| Dubious signature "(const CURLU *,CURLUPart,char **,unsigned int)" in summary model. |
3162+
| Dubious signature "(const ComPtr &)" in summary model. |
31583163
| Dubious signature "(const Command *,const size_t,const BlockSplit *,const BlockSplit *,const BlockSplit *,const uint8_t *,size_t,size_t,uint8_t,uint8_t,const ContextType *,HistogramLiteral *,HistogramCommand *,HistogramDistance *)" in summary model. |
31593164
| Dubious signature "(const Curl_easy *,const connectdata *,int)" in summary model. |
31603165
| Dubious signature "(const DH *)" in summary model. |

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,14 +1317,14 @@ void test_constructor()
13171317

13181318
int x = source<int>();
13191319
Microsoft::WRL::ComPtr<int> p1(new int(x));
1320-
sink(*p1.Get()); // $ MISSING: ast,ir
1321-
sink(*p1.Detach()); // $ MISSING: ast,ir
1320+
sink(*p1.Get()); // $ ir MISSING: ast
1321+
sink(*p1.Detach()); // $ ir MISSING: ast
13221322

13231323
Microsoft::WRL::ComPtr<int> p2(p1);
1324-
sink(*p2.Get()); // $ MISSING: ast,ir
1324+
sink(*p2.Get()); // $ ir MISSING: ast
13251325

13261326
Microsoft::WRL::ComPtr<int> p3(std::move(p1));
1327-
sink(*p3.Get()); // $ MISSING: ast,ir
1327+
sink(*p3.Get()); // $ ir MISSING: ast
13281328
}
13291329

13301330
void test_As()
@@ -1333,7 +1333,7 @@ void test_As()
13331333
Microsoft::WRL::ComPtr<int> p1(new int(x));
13341334
Microsoft::WRL::ComPtr<int> p2;
13351335
p1.As(&p2);
1336-
sink(*p2.Get()); // $ MISSING: ast,ir
1336+
sink(*p2.Get()); // $ ir MISSING: ast
13371337
}
13381338

13391339
void test_CopyTo()
@@ -1342,11 +1342,11 @@ void test_CopyTo()
13421342
Microsoft::WRL::ComPtr<int> p1(new int(x));
13431343
int *raw = nullptr;
13441344
p1.CopyTo(&raw);
1345-
sink(*raw); // $ MISSING: ast,ir
1345+
sink(*raw); // $ ir MISSING: ast
13461346

13471347
Microsoft::WRL::ComPtr<int> p2;
13481348
p1.CopyTo(nullptr, (void**)&raw);
1349-
sink(*raw); // $ MISSING: ast,ir
1349+
sink(*raw); // $ ir MISSING: ast
13501350
}
13511351

13521352
void test_Swap()
@@ -1355,20 +1355,20 @@ void test_Swap()
13551355
Microsoft::WRL::ComPtr<int> p1(new int(x));
13561356
Microsoft::WRL::ComPtr<int> p2;
13571357
p1.Swap(p2);
1358-
sink(*p2.Get()); // $ MISSING: ast,ir
1359-
sink(*p1.Get()); // clean
1358+
sink(*p2.Get()); // $ ir MISSING: ast
1359+
sink(*p1.Get()); // $ SPURIOUS: ir
13601360
}
13611361

13621362
void test_GetAddressOf()
13631363
{
13641364
int x = source<int>();
13651365
Microsoft::WRL::ComPtr<int> p1(new int(x));
1366-
sink(**p1.GetAddressOf()); // $ MISSING: ast,ir
1366+
sink(**p1.GetAddressOf()); // $ ir MISSING: ast
13671367

13681368
const Microsoft::WRL::ComPtr<int> p2(new int(x));
1369-
sink(**p2.GetAddressOf()); // $ MISSING: ast,ir
1369+
sink(**p2.GetAddressOf()); // $ ir MISSING: ast
13701370

13711371
Microsoft::WRL::ComPtr<int> p3(new int(x));
13721372
int **pp = p3.ReleaseAndGetAddressOf();
1373-
sink(**pp); // $ MISSING: ast,ir
1373+
sink(**pp); // $ ir MISSING: ast
13741374
}

cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5567,7 +5567,12 @@ signatureMatches
55675567
| atl.cpp:1231:5:1231:12 | CStrBufT | (const char *,const char *,unsigned long) | | __ngettext | 2 |
55685568
| atl.cpp:1231:5:1231:12 | CStrBufT | (unsigned char *,int,unsigned long) | | UTF8_putc | 1 |
55695569
| atl.cpp:1231:5:1231:12 | CStrBufT | (unsigned char *,int,unsigned long) | | UTF8_putc | 2 |
5570+
| atl.cpp:1268:5:1268:10 | ComPtr | (const ComPtr &) | ComPtr | ComPtr | 0 |
5571+
| atl.cpp:1272:5:1272:10 | ComPtr | (T *) | ComPtr | ComPtr<T> | 0 |
5572+
| atl.cpp:1283:13:1283:18 | CopyTo | (T **) | ComPtr<T> | CopyTo | 0 |
55705573
| atl.cpp:1285:13:1285:18 | CopyTo | (Curl_easy *,void **) | | Curl_resolver_init | 1 |
5574+
| atl.cpp:1285:13:1285:18 | CopyTo | (REFIID,void **) | ComPtr | CopyTo | 0 |
5575+
| atl.cpp:1285:13:1285:18 | CopyTo | (REFIID,void **) | ComPtr | CopyTo | 1 |
55715576
| atl.cpp:1285:13:1285:18 | CopyTo | (size_t,void **) | | __libc_alloc_buffer_allocate | 1 |
55725577
| bsd.cpp:12:5:12:10 | accept | (CURLM *,curl_socket_t,int *) | | curl_multi_socket | 2 |
55735578
| bsd.cpp:12:5:12:10 | accept | (Curl_easy *,ssize_t *,int *) | | Curl_GetFTPResponse | 2 |
@@ -21752,6 +21757,7 @@ getSignatureParameterName
2175221757
| (CURLU *,const char *,char **,OperationConfig *) | | ipfs_url_rewrite | 1 | const char * |
2175321758
| (CURLU *,const char *,char **,OperationConfig *) | | ipfs_url_rewrite | 2 | char ** |
2175421759
| (CURLU *,const char *,char **,OperationConfig *) | | ipfs_url_rewrite | 3 | OperationConfig * |
21760+
| (ComPtr &&) | ComPtr | ComPtr | 0 | ComPtr && |
2175521761
| (CompoundDictionary *,const PreparedDictionary *) | | AttachPreparedDictionary | 0 | CompoundDictionary * |
2175621762
| (CompoundDictionary *,const PreparedDictionary *) | | AttachPreparedDictionary | 1 | const PreparedDictionary * |
2175721763
| (Curl_cfilter *) | | Curl_conn_cf_is_ssl | 0 | Curl_cfilter * |
@@ -28582,6 +28588,8 @@ getSignatureParameterName
2858228588
| (RAND_POOL *,unsigned int) | | ossl_rand_pool_bytes_needed | 1 | unsigned int |
2858328589
| (RECORD_LAYER *,SSL_CONNECTION *) | | RECORD_LAYER_init | 0 | RECORD_LAYER * |
2858428590
| (RECORD_LAYER *,SSL_CONNECTION *) | | RECORD_LAYER_init | 1 | SSL_CONNECTION * |
28591+
| (REFIID,void **) | ComPtr | CopyTo | 0 | REFIID |
28592+
| (REFIID,void **) | ComPtr | CopyTo | 1 | void ** |
2858528593
| (RIO_NOTIFIER *) | | ossl_rio_notifier_cleanup | 0 | RIO_NOTIFIER * |
2858628594
| (RIPEMD160_CTX *,const unsigned char *) | | RIPEMD160_Transform | 0 | RIPEMD160_CTX * |
2858728595
| (RIPEMD160_CTX *,const unsigned char *) | | RIPEMD160_Transform | 1 | const unsigned char * |
@@ -30165,6 +30173,8 @@ getSignatureParameterName
3016530173
| (Strtab *,const char *,size_t) | | strtabadd | 2 | size_t |
3016630174
| (Strtab *,size_t *) | | strtabfinalize | 0 | Strtab * |
3016730175
| (Strtab *,size_t *) | | strtabfinalize | 1 | size_t * |
30176+
| (T *) | ComPtr | ComPtr<T> | 0 | func:0 * |
30177+
| (T **) | ComPtr<T> | CopyTo | 0 | class:0 ** |
3016830178
| (TLS_FEATURE *) | | TLS_FEATURE_free | 0 | TLS_FEATURE * |
3016930179
| (TLS_RL_RECORD *,const unsigned char *) | | ossl_tls_rl_record_set_seq_num | 0 | TLS_RL_RECORD * |
3017030180
| (TLS_RL_RECORD *,const unsigned char *) | | ossl_tls_rl_record_set_seq_num | 1 | const unsigned char * |
@@ -33307,6 +33317,7 @@ getSignatureParameterName
3330733317
| (const CURLU *,CURLUPart,char **,unsigned int) | | curl_url_get | 1 | CURLUPart |
3330833318
| (const CURLU *,CURLUPart,char **,unsigned int) | | curl_url_get | 2 | char ** |
3330933319
| (const CURLU *,CURLUPart,char **,unsigned int) | | curl_url_get | 3 | unsigned int |
33320+
| (const ComPtr &) | ComPtr | ComPtr | 0 | const ComPtr & |
3331033321
| (const Command *,const size_t,const BlockSplit *,const BlockSplit *,const BlockSplit *,const uint8_t *,size_t,size_t,uint8_t,uint8_t,const ContextType *,HistogramLiteral *,HistogramCommand *,HistogramDistance *) | | BrotliBuildHistogramsWithContext | 0 | const Command * |
3331133322
| (const Command *,const size_t,const BlockSplit *,const BlockSplit *,const BlockSplit *,const uint8_t *,size_t,size_t,uint8_t,uint8_t,const ContextType *,HistogramLiteral *,HistogramCommand *,HistogramDistance *) | | BrotliBuildHistogramsWithContext | 1 | const size_t |
3331233323
| (const Command *,const size_t,const BlockSplit *,const BlockSplit *,const BlockSplit *,const uint8_t *,size_t,size_t,uint8_t,uint8_t,const ContextType *,HistogramLiteral *,HistogramCommand *,HistogramDistance *) | | BrotliBuildHistogramsWithContext | 2 | const BlockSplit * |

0 commit comments

Comments
 (0)