Mathias Vorreiter Pedersen
3efe60fdd2
C++: Accept test changes.
2021-10-28 12:35:01 +01:00
Dave Bartolomeo
383210096c
C++: Isolate models from AST dataflow's reference/object conflation
...
`DataFlowFunction` models treat references a pointers - an explicit level of indirection. The AST dataflow library generally treats references as if they were the referred-to object. This commit removes a workaround in the dataflow model for unary `operator*` on smart pointers, and makes the AST dataflow library adjust the results of querying the model so that a returned reference only gets flow that was modeled as going to the dereference of the return value.
This fixes some missing flow in IR dataflow, and recovers some (presumably) missing reverse taint flow in AST taint tracking as well.
2021-04-21 18:09:44 -04:00
Mathias Vorreiter Pedersen
1510fe370d
C++: Add cases for const pointer wrapper references to AddressFlow and FlowVar.
2021-04-09 20:58:05 +02:00
Mathias Vorreiter Pedersen
2329b31601
C++: Replace the new SmartPointerPartialDefinition with additional steps in AddressFlow.qll
2021-04-09 20:49:45 +02:00
Mathias Vorreiter Pedersen
a460e3ad3d
Merge branch 'main' into ast-flow-smart-pointers
2021-04-09 19:41:10 +02:00
Mathias Vorreiter Pedersen
996cda9b97
C++: Fix incorrect test annotation.
2021-04-09 14:46:46 +02:00
Mathias Vorreiter Pedersen
80d5b17900
C++: Remove the dataflow rule for smart_ptr -> *smart_ptr.
2021-04-09 14:20:51 +02:00
Mathias Vorreiter Pedersen
cae0060a89
C++: Replace the new rules in DataFlowUtil with a dataflow model for pointer wrapper classes.
2021-04-09 14:06:58 +02:00
Mathias Vorreiter Pedersen
8382e85901
C++: Add flow into the source of read step and out of the target of a store step for smart pointers in AST dataflow.
2021-04-06 14:05:55 +02:00
Mathias Vorreiter Pedersen
f07d844362
C++: Add a test containing missing read/store dataflow steps for smart pointers.
2021-04-06 13:59:27 +02:00
Mathias Vorreiter Pedersen
9ff894bf83
C++: Add support for AST dataflow out of functions that take a smart pointer by value.
2021-03-31 13:54:32 +02:00
Mathias Vorreiter Pedersen
8159098dc0
C++: Add test from issue #5190 .
2021-03-31 11:32:01 +02:00
Cornelius Riemenschneider
b632ca40b4
C++: Port dataflow/taint-tests to inline expectations test.
2020-11-30 17:32:54 +01:00
Mathias Vorreiter Pedersen
8226515138
C++: Add a taint model for std::{shared, unique}_ptr<T>::get
2020-09-09 12:22:29 +02:00
Mathias Vorreiter Pedersen
f025d09bf0
C++: Accept test changes
2020-09-08 19:12:00 +02:00
Mathias Vorreiter Pedersen
7ac5e84925
C++: Add make_shared and make_unique test cases
2020-09-08 19:03:54 +02:00